Skip to content

Commit 61c9380

Browse files
committed
Update spotlightsearch.js
1 parent bcfa7c3 commit 61c9380

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spotlightsearch.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ searchBack.addEventListener('click', () => {
3636

3737
// search when typed in input
3838
searchInput.addEventListener('input', () => {
39-
39+
40+
if (searchInput.innerHTML === '<br>') {
41+
42+
searchInput.textContent = '';
43+
44+
}
45+
4046
let query = searchInput.textContent.toLowerCase().replaceAll('\n', '');
4147
let files = fileWrapper.querySelectorAll('.item');
4248

0 commit comments

Comments
 (0)