Skip to content

Commit 470d8df

Browse files
committed
Update spotlightsearch.js
1 parent 5c67968 commit 470d8df

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

spotlightsearch.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ searchInput.addEventListener('blur', () => {
6969

7070
searchInput.search = () => {
7171

72+
const moreButton = fileWrapper.querySelector('.item.more');
73+
74+
// if more button is disabled (loading more items),
75+
// don't search
76+
if (moreButton &&
77+
moreButton.classList.contains('disabled')) {
78+
79+
return;
80+
81+
}
82+
83+
7284
if (searchInput.innerHTML === '<br>') {
7385

7486
searchInput.textContent = '';
@@ -120,8 +132,6 @@ searchInput.search = () => {
120132
}
121133

122134

123-
const moreButton = fileWrapper.querySelector('.item.more');
124-
125135
// if more button exists
126136
if (moreButton) {
127137

0 commit comments

Comments
 (0)