aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionMenu.tsx
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2020-10-24 12:49:26 +0800
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2020-10-24 12:49:26 +0800
commit7a5ffd091f54c0205abd0e97cd283f1914d48bfe (patch)
treee4abba79c5bbba63d493c53d6d32a07292a1479d /src/client/views/collections/CollectionMenu.tsx
parent97acefbfad903b117de59c841224fe801be03984 (diff)
parent7096b3a4c888816db9196f56a7bc01b89558d0ce (diff)
Merge branch 'master' into presentation_v1
Diffstat (limited to 'src/client/views/collections/CollectionMenu.tsx')
-rw-r--r--src/client/views/collections/CollectionMenu.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index abad23e0d..34a1c0697 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -400,7 +400,7 @@ export class CollectionViewBaseChrome extends React.Component<CollectionMenuProp
pinWithView = (targetDoc: Opt<Doc>) => {
if (targetDoc) {
TabDocView.PinDoc(targetDoc, false);
- const activeDoc = PresBox.Instance.childDocs[PresBox.Instance.childDocs.length - 1];
+ const activeDoc = PresBox.Instance?.childDocs[PresBox.Instance?.childDocs.length - 1];
if (targetDoc.type === DocumentType.PDF || targetDoc.type === DocumentType.RTF || targetDoc.type === DocumentType.WEB || targetDoc._viewType === CollectionViewType.Stacking) {
const scroll = targetDoc._scrollTop;
activeDoc.presPinView = true;