aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Schema.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-03-10 00:39:32 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-03-10 00:39:32 -0400
commit99039ccec5b53bc7d3ace46e801c84342c99cad1 (patch)
tree64ead71dfc678ddf5d3c25a8bccbfa10e236e89c /src/new_fields/Schema.ts
parent4eaec2585a4f38a826707f2cf850d287276d9b14 (diff)
parent7fa0783cdc37a70dc8d967188a27d50f269042cc (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/new_fields/Schema.ts')
-rw-r--r--src/new_fields/Schema.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_fields/Schema.ts b/src/new_fields/Schema.ts
index 3f0ff4284..72bce283d 100644
--- a/src/new_fields/Schema.ts
+++ b/src/new_fields/Schema.ts
@@ -33,7 +33,7 @@ export function makeInterface<T extends Interface[]>(...schemas: T): InterfaceFu
get(target: any, prop, receiver) {
const field = receiver.doc[prop];
if (prop in schema) {
- const desc = (schema as any)[prop];
+ 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
return Cast(field, desc.type, desc.defaultVal);
} else if (typeof desc === "function" && !ObjectField.isPrototypeOf(desc) && !RefField.isPrototypeOf(desc)) {