diff options
author | bobzel <zzzman@gmail.com> | 2020-03-09 19:47:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 19:47:45 -0400 |
commit | 7fa0783cdc37a70dc8d967188a27d50f269042cc (patch) | |
tree | baa864643547ba264e85a09ad878818ab3cf7111 /src/new_fields/Schema.ts | |
parent | cabb2cf9065d85112f1bd89e31b41dafdbc4ba54 (diff) | |
parent | 08aa3b6fc47cb7719c5690c176d05db36e724382 (diff) |
Merge pull request #345 from browngraphicslab/audio_refactor
Audio refactor
Diffstat (limited to 'src/new_fields/Schema.ts')
-rw-r--r-- | src/new_fields/Schema.ts | 2 |
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)) { |