aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authoreperelm2 <emily_perelman@brown.edu>2023-08-03 11:15:32 -0400
committereperelm2 <emily_perelman@brown.edu>2023-08-03 11:15:32 -0400
commit102b45310de1344c7341fcf457af7ab8dec5c0b2 (patch)
treee0238013c3d8996c1165058f4c2250295cb82f0a /src/fields/Doc.ts
parentaa9f4b3ced3b4c6a1850cb9a0b3ea2f188998a55 (diff)
parentd982196de5008ccafc4c40a6e9c863e8c3e29d6c (diff)
Merge branch 'master' into secondpropertiesmenu-emily
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 84b1705bc..0bd838ed6 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -1309,7 +1309,7 @@ export namespace Doc {
}
export function LinkEndpoint(linkDoc: Doc, anchorDoc: Doc) {
- if (linkDoc.link_anchor_2 === anchorDoc || (linkDoc.link_anchor_2 as Doc).annotationOn) return '2';
+ if (Doc.AreProtosEqual(linkDoc.link_anchor_2 as Doc, anchorDoc) || Doc.AreProtosEqual((linkDoc.link_anchor_2 as Doc).annotationOn as Doc, anchorDoc)) return '2';
return Doc.AreProtosEqual(anchorDoc, (linkDoc.link_anchor_1 as Doc).annotationOn as Doc) || Doc.AreProtosEqual(anchorDoc, linkDoc.link_anchor_1 as Doc) ? '1' : '2';
}