Skip to content

Commit dd8df56

Browse files
cdervclaude
andcommitted
Guard tab activation with try-catch for resilience
Wrap bootstrap.Tab.show() call in try-catch so a single broken tab does not prevent activation of remaining tabsets with search matches. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent d7cb76b commit dd8df56

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/resources/projects/website/search/quarto-search.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,11 @@ function activateTabsWithMatches(mainEl) {
11751175
`[data-bs-toggle="tab"][data-bs-target="#${escapedId}"]`
11761176
);
11771177
if (tabButton) {
1178-
new bootstrap.Tab(tabButton).show();
1178+
try {
1179+
new bootstrap.Tab(tabButton).show();
1180+
} catch (e) {
1181+
// Skip this tab if Bootstrap Tab API fails
1182+
}
11791183
}
11801184
}
11811185
}

0 commit comments

Comments
 (0)