aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TabDocView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-18 01:25:39 -0400
committerbobzel <zzzman@gmail.com>2024-10-18 01:25:39 -0400
commitcc3bdef579624d489fa6760733d6f9c31b8f2357 (patch)
tree6f24ba051a6e1f7b4b8af47effd67f11627046ee /src/client/views/collections/TabDocView.tsx
parent0728e918e6d075c0eda738b7d2fdbf6095c714ae (diff)
fixed tab switching instead of bringing up a lightbox when following link to doc in different tab.
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
-rw-r--r--src/client/views/collections/TabDocView.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index 1c5722217..60728877a 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -285,7 +285,7 @@ export class TabDocView extends ObservableReactComponent<TabDocViewProps> {
static Activate = (tabDoc: Doc) => {
const tab = Array.from(CollectionDockingView.Instance?.tabMap ?? []).find(findTab => findTab.DashDoc === tabDoc && !findTab.contentItem.config.props.keyValue);
- if (tab.header.parent._activeContentItem === tab.contentItem) return false;
+ if (tab && tab.header.parent._activeContentItem === tab.contentItem) return false;
tab?.header.parent.setActiveContentItem(tab.contentItem); // glr: Panning does not work when this is set - (this line is for trying to make a tab that is not topmost become topmost)
return tab !== undefined;
};