diff options
author | bobzel <zzzman@gmail.com> | 2024-03-19 17:08:46 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-03-19 17:08:46 -0400 |
commit | a974aa4e6573c8becf93f78610406747fec14c1c (patch) | |
tree | 73d90441a811d48b7a701273522d5cfabcb9159f /src/fields/util.ts | |
parent | 7d31c773ab85697b8a5eeecc752b567c8235efec (diff) |
cleaned up user templates to not get changed on reload. made setting a template add it to the template tools list and as a tools button. fixed linking to parts of a template. fixed disappearing templates caused by stacking view set a field with an empty key. updated field assignment syntax in trees, dash field views, and key value box to all use :,:=,=,=:= syntax. added text elide button. added @(title) syntax for hyperlinking. made using a template both inherit from the template to get default values and use the template to render. fixed submenu placement of context menu. updated RTF markdown doc.
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r-- | src/fields/util.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts index b73520999..c2ec3f13a 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -286,6 +286,10 @@ export function distributeAcls(key: string, acl: SharingPermissions, target: Doc // target should be either a Doc or ListImpl. receiver should be a Proxy<Doc> Or List. // export function setter(target: any, in_prop: string | symbol | number, value: any, receiver: any): boolean { + if (!in_prop) { + console.log('WARNING: trying to set an empty property. This should be fixed. '); + return false; + } let prop = in_prop; const effectiveAcl = in_prop === 'constructor' || typeof in_prop === 'symbol' ? AclAdmin : GetPropAcl(target, prop); if (effectiveAcl !== AclEdit && effectiveAcl !== AclAugment && effectiveAcl !== AclAdmin) return true; |