Skip to content

Commit 10255f9

Browse files
committed
Update spotlightsearch.js
1 parent 470d8df commit 10255f9

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

spotlightsearch.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ 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-
8472
if (searchInput.innerHTML === '<br>') {
8573

8674
searchInput.textContent = '';
@@ -132,8 +120,12 @@ searchInput.search = () => {
132120
}
133121

134122

123+
const moreButton = fileWrapper.querySelector('.item.more');
124+
135125
// if more button exists
136-
if (moreButton) {
126+
// and is not disabled (loading more)
127+
if (moreButton &&
128+
!moreButton.classList.contains('disabled')) {
137129

138130
// if more button is in view
139131
if (elInView(moreButton)) {

0 commit comments

Comments
 (0)