aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorandrewdkim <adkim414@gmail.com>2019-06-20 16:33:20 -0400
committerandrewdkim <adkim414@gmail.com>2019-06-20 16:33:20 -0400
commit1fa8e6c102b41bf99b7af9d803b6060284afc8b7 (patch)
tree8cbe91a4f3ea866abc6f160d63a7a812446a66d1 /src/new_fields/Doc.ts
parent82f21b627c4823b1984cd1865aea6eb91f290eca (diff)
parenta5dc0e04add05f2f5bf1e17f1ac0a5e0aba1ea41 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into animationtimeline
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 1b0ff812f..de4bc4d5d 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -207,7 +207,7 @@ export namespace Doc {
// gets the document's prototype or returns the document if it is a prototype
export function GetProto(doc: Doc) {
- return Doc.GetT(doc, "isPrototype", "boolean", true) ? doc : doc.proto!;
+ return Doc.GetT(doc, "isPrototype", "boolean", true) ? doc : (doc.proto || doc);
}
export function allKeys(doc: Doc): string[] {