aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorAbdullah Ahmed <abdullah_ahmed@brown.edu>2019-06-15 20:09:41 -0400
committerAbdullah Ahmed <abdullah_ahmed@brown.edu>2019-06-15 20:09:41 -0400
commit881df5e1255681a306af2d9f78b092b3688ad38c (patch)
treeb456f0e559eba0c03f937111d1b15bbf08495fc9 /src/new_fields/Doc.ts
parentc22feda3d2df8f6814c0837ea18ad293975ae2e4 (diff)
parent618d3717e118f978de976cb34e8bc2051c726ffc (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into text_box_ab
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);