mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 11:07:55 -05:00
refac
This commit is contained in:
1 parent
0ebfed71f2
commit
5326fc4119
1 file changed
+2
-1
@@ -998,7 +998,8 @@
|
||||
const link = (event.target as Element)?.closest<HTMLAnchorElement>('#sidebar a[href]');
|
||||
if (!link || link.target === '_blank' || link.hasAttribute('download')) return;
|
||||
if (link.closest('#sidebar-chat-item')?.querySelector('[role="checkbox"]')) return;
|
||||
if (link.pathname.startsWith('/c/') || (link.pathname === '/' && !link.search)) return;
|
||||
if (link.pathname.startsWith('/c/') && link.pathname !== `/c/${$chatId}`) return;
|
||||
if (link.pathname === '/' && !link.search) return;
|
||||
if (openSidebarPage(link.href, link.getAttribute('aria-label') || link.textContent?.trim())) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
Reference in new issue
Block a user