diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-09-06 01:41:06 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-09-06 01:41:06 -0400 |
commit | e5b52b1083c86b946a2758983e397826579d2282 (patch) | |
tree | 1e4f0e9fdc40cbb6db2c07dfcc8b3e8cbb5c2fc6 /src/new_fields/Doc.ts | |
parent | a936f08e3c18ad34bbe74133eaa768c7bda832dc (diff) |
fixed summarizing in text notes.
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 a703f1cef..1462cdfad 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -308,7 +308,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 || doc); + return doc && (Doc.GetT(doc, "isPrototype", "boolean", true) ? doc : (doc.proto || doc)); } export function GetDataDoc(doc: Doc): Doc { let proto = Doc.GetProto(doc); |