aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-06-14 11:56:40 -0400
committerbob <bcz@cs.brown.edu>2019-06-14 11:56:40 -0400
commit0c9dc7be8c6b885b14ed4aacd7e9c8cd5c8bf208 (patch)
tree66325669dce7efe966b42f268a04faaa4c899532 /src/new_fields/Doc.ts
parent6a2cb71af332d4c782c1678750ba955757eaab45 (diff)
parent618d3717e118f978de976cb34e8bc2051c726ffc (diff)
Merge branch 'master' into pdf_impl
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 7e02a5bc5..c2cfda079 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -186,7 +186,8 @@ export namespace Doc {
}
// compare whether documents or their protos match
- export function AreProtosEqual(doc: Doc, other: Doc) {
+ export function AreProtosEqual(doc?: Doc, other?: Doc) {
+ if (!doc || !other) return false;
let r = (doc === other);
let r2 = (doc.proto === other);
let r3 = (other.proto === doc);