diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-07-25 10:36:07 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-07-25 10:36:07 -0500 |
commit | b2ff3e5bf4892df51febf4b98e4a4bb977561392 (patch) | |
tree | 558f802071eec15f6fc6df45cb8ef9a22362e75d /src/fields/Schema.ts | |
parent | 229e8ba914943da0d11dff00d14a8adae950d853 (diff) | |
parent | 99e0b01dbe41e56cfdb748b53f03fe71d73a80b7 (diff) |
merge w master
Diffstat (limited to 'src/fields/Schema.ts')
-rw-r--r-- | src/fields/Schema.ts | 2 |
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 |