aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Schema.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-07-24 23:59:09 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-07-24 23:59:09 -0400
commit760c51c493ef190aa5283944b083b55f7c057e6c (patch)
tree3745e6f5605bcad4f63415fb610877ca35fcca00 /src/fields/Schema.ts
parent0546300e7775395e5787452a1665d4e47f0ba086 (diff)
several siggnificant changes to how acls work with makin documents updated interactively when permissions chane.
Diffstat (limited to 'src/fields/Schema.ts')
-rw-r--r--src/fields/Schema.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/Schema.ts b/src/fields/Schema.ts
index 98ef3e087..c6a8d6ae9 100644
--- a/src/fields/Schema.ts
+++ b/src/fields/Schema.ts
@@ -31,7 +31,7 @@ export function makeInterface<T extends Interface[]>(...schemas: T): InterfaceFu
}
const proto = new Proxy({}, {
get(target: any, prop, receiver) {
- const field = receiver.doc[prop];
+ const field = receiver.doc?.[prop];
if (prop in schema) {
const desc = prop === "proto" ? Doc : (schema as any)[prop]; // bcz: proto doesn't appear in schemas ... maybe it should?
if (typeof desc === "object" && "defaultVal" in desc && "type" in desc) {//defaultSpec