diff options
author | bob <bcz@cs.brown.edu> | 2019-07-11 15:10:46 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-07-11 15:10:46 -0400 |
commit | 6060e67bcf08089b826685c512e3aa181c714446 (patch) | |
tree | e54f84a576e471e72bcbba02dc3b7286a22a9415 /src/client/util/DocumentManager.ts | |
parent | d5acf6672b5b7cedf7b6d65293d671faf9bf4a4f (diff) | |
parent | 7006f67b7cf15734fb0b63d917ae392758704f75 (diff) |
Merge branch 'master' into extensionFields
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 }[])); |