diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2024-03-31 13:24:39 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2024-03-31 13:24:39 -0400 |
commit | c254b38690e27b32d3ac6316af9bb37d6d3e86aa (patch) | |
tree | 0f94869895530d5f8b16631aa164bbcf4cd3e9d4 /src/fields/util.ts | |
parent | 4c4ab22252aba8f08d8a384e2bd0c6696db9b43b (diff) | |
parent | 1e37adacfe5b44a71ed7d7dfd785c6c2d0808eae (diff) |
Merge branch 'master' into dataviz-ai-sarah
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; |