aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-06-13 11:58:41 -0400
committerbob <bcz@cs.brown.edu>2019-06-13 11:58:41 -0400
commit5c8e4ee0c87b140f01f0d287af04fe205a80a584 (patch)
treedea35fe98ed404b762d8bbfcc7ba772225bda8f0 /src/new_fields/Doc.ts
parent95674ee7f68782d1ce85858120efea956825bcb9 (diff)
parente81e116b89fad0f3fcfb76039b0b802073307478 (diff)
Merge branch 'master' into rich_text_linking
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);