diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-20 14:54:55 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-20 14:54:55 -0400 |
commit | 1f24c5010a1cf6365265ea1f02327bb81a98134a (patch) | |
tree | 8f9cb5311c75931f100dfde90c0534eb7ddc69f5 /src/new_fields/Doc.ts | |
parent | 8dbfb3029a99eaf37a5234e9d9e33cc64f779b03 (diff) |
Doc.GetProto change and swapped KVP syntax
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 2 |
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[] { |