mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-22 21:50:42 -05:00
fix: a tab for a channel or note that no longer exists closes instead of staying on a spinner (#34294)
This commit is contained in:
1 file changed
+6
-1
@@ -711,8 +711,13 @@
|
||||
} else openPanel(createPageTab(request));
|
||||
};
|
||||
const navigatePageTab = async (id: string, href: string) => {
|
||||
if (!((await pageViews[id]?.requestClose()) ?? true)) return;
|
||||
const url = new URL(href, location.origin);
|
||||
if (url.pathname === '/' && !url.search) {
|
||||
await closeTab(id);
|
||||
focusMainChat();
|
||||
return;
|
||||
}
|
||||
if (!((await pageViews[id]?.requestClose()) ?? true)) return;
|
||||
if (url.pathname === '/' || url.pathname.startsWith('/c/')) {
|
||||
openPageTab({ href, label: '' });
|
||||
} else if (viewEntry) updateViewTab(viewEntry, id, { href });
|
||||
|
||||
Reference in new issue
Block a user