Skip to content

Commit 11af3fc

Browse files
authored
handle null result from queryselector (#1683)
fix queryselector
1 parent c04f042 commit 11af3fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ function fixMoreLinksInMobileSidebar() {
581581
const dropdown = document.querySelector(
582582
".bd-sidebar-primary [id^=pst-nav-more-links]"
583583
);
584-
dropdown.classList.add("show");
584+
if (dropdown !== null) {
585+
dropdown.classList.add("show");
586+
}
585587
}
586588

587589
/*******************************************************************************

0 commit comments

Comments
 (0)