Skip to content

Commit 0741fea

Browse files
committed
use const
1 parent 200d871 commit 0741fea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,14 @@ var findSearchInput = () => {
208208
*/
209209
var toggleSearchField = () => {
210210
// Find the search input to highlight
211-
let input = findSearchInput();
211+
const input = findSearchInput();
212212

213213
// if the input field is the hidden one (the one associated with the
214214
// search button) then toggle the button state (to show/hide the field)
215-
let searchDialog = document.querySelector(".search-button__search-container");
216-
let hiddenInput = searchDialog.querySelector("input");
215+
const searchDialog = document.querySelector(
216+
".search-button__search-container",
217+
);
218+
const hiddenInput = searchDialog.querySelector("input");
217219
if (input === hiddenInput) {
218220
if (searchDialog.open) {
219221
searchDialog.close();

0 commit comments

Comments
 (0)