Skip to content

Commit b27b010

Browse files
committed
Update
1 parent d59c847 commit b27b010

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/overrides/Sidebar.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
4444
const globalSearchLink = document.getElementById('global-search-link') as HTMLButtonElement;
4545
const sidebarContent = document.querySelector('.sidebar-content');
4646

47-
track("use sidebar search", { query: searchInput });
48-
4947
if (!searchInput || !sidebarContent || !noResultsMessage || !globalSearchLink) return;
5048

5149
const originalState: Map<Element, boolean> = new Map();
@@ -97,6 +95,7 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
9795
function filterSidebarItems(query: string) {
9896
const items = sidebarContent!.querySelectorAll('li');
9997
const detailsElements = sidebarContent!.querySelectorAll('details');
98+
track("use sidebar search", { query: query });
10099

101100
if (!query.trim()) {
102101
// Reset to original state

0 commit comments

Comments
 (0)