From cc3bdef579624d489fa6760733d6f9c31b8f2357 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 18 Oct 2024 01:25:39 -0400 Subject: fixed tab switching instead of bringing up a lightbox when following link to doc in different tab. --- src/client/views/collections/TabDocView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/views/collections') 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 { 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; }; -- cgit v1.2.3-70-g09d2