aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Schema.ts
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-07-26 17:42:34 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-07-26 17:42:34 +0800
commitbbdfacd4f748ac1bb0e175aa32b593e2159c6843 (patch)
tree12d51d5103bda0ee4b87e904316e772f5e2c4e6a /src/fields/Schema.ts
parentb83a38a3a92c0149562da460ad9c35eaaf3054ec (diff)
parent5454385b6fabbcafee4d797829fb9ceaa8a71ed1 (diff)
Merge branch 'master' into presentation_updates
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