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/DocumentManager.ts | |
parent | b1b69f8a4f9e34f0c8e667ec95f9fe16ebc8b2e4 (diff) |
fixes
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 8fa460bca..bb1345044 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -111,9 +111,11 @@ export class DocumentManager { pairs.push(...linksList.reduce((pairs, link) => { if (link) { let linkToDoc = LinkManager.Instance.getOppositeAnchor(link, dv.props.Document); - DocumentManager.Instance.getDocumentViews(linkToDoc).map(docView1 => { - pairs.push({ a: dv, b: docView1, l: link }); - }); + if (linkToDoc) { + DocumentManager.Instance.getDocumentViews(linkToDoc).map(docView1 => { + pairs.push({ a: dv, b: docView1, l: link }); + }); + } } return pairs; }, [] as { a: DocumentView, b: DocumentView, l: Doc }[])); |