aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-22 22:11:37 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-22 22:11:37 -0400
commit3c5bc5b89c3158c6c1dce02f99aa0c08d24dcb39 (patch)
tree99bed6d83f5a01ff2654cd4fb635ea5c48bcc820 /src/fields/util.ts
parent26d7e045c5b0a9a29612e68d976e35c0e7e23d00 (diff)
parenta974aa4e6573c8becf93f78610406747fec14c1c (diff)
Merge branch 'master' into nathan-starter
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts4
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;