diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-07-11 12:36:34 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-07-11 12:36:34 -0400 |
commit | a69a43015ec414bd1a9577c03fbeb5c3b27fb55f (patch) | |
tree | 45c5e3ed0d00b88df7940f77269a14901b964d23 /src/client/util/LinkManager.ts | |
parent | b1b69f8a4f9e34f0c8e667ec95f9fe16ebc8b2e4 (diff) |
fixes
Diffstat (limited to 'src/client/util/LinkManager.ts')
-rw-r--r-- | src/client/util/LinkManager.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/LinkManager.ts b/src/client/util/LinkManager.ts index 944bc532f..1ed040aa4 100644 --- a/src/client/util/LinkManager.ts +++ b/src/client/util/LinkManager.ts @@ -232,11 +232,11 @@ export class LinkManager { // finds the opposite anchor of a given anchor in a link //TODO This should probably return undefined if there isn't an opposite anchor //TODO This should also await the return value of the anchor so we don't filter out promises - public getOppositeAnchor(linkDoc: Doc, anchor: Doc): Doc { + public getOppositeAnchor(linkDoc: Doc, anchor: Doc): Doc | undefined { if (Doc.AreProtosEqual(anchor, Cast(linkDoc.anchor1, Doc, null))) { - return Cast(linkDoc.anchor2, Doc, null)!; + return Cast(linkDoc.anchor2, Doc, null); } else { - return Cast(linkDoc.anchor1, Doc, null)!; + return Cast(linkDoc.anchor1, Doc, null); } } }
\ No newline at end of file |