From 0a924d6d8a76aa2cc50dad9a2d4296ec6d4624e5 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 9 Mar 2020 15:23:55 -0400 Subject: fixed link following for textbox templates. fixed link following to annotaiton on videos. --- src/new_fields/Schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/new_fields/Schema.ts') 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(...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)) { -- cgit v1.2.3-70-g09d2