Fix search count

This commit is contained in:
RubenPX 2022-04-12 13:59:25 +02:00
parent b8493d8f5c
commit c733f0a1d8
1 changed files with 24 additions and 24 deletions

View File

@ -280,15 +280,15 @@
let resultCount = 0;
function searchCompleted() {
resultCount++;
if (resultCount < 2 && document.getElementById("dropdown-search-list").children.length > 0) {
setTimeout(() => {
if (resultCount == 2 && document.getElementById("dropdown-search-list").children.length == 2) {
document.getElementById("dropdown-search-list").innerHTML = `
<li id="deviceSearchLoader" class="dropdown-item">
<i class="bi bi-x-lg"></i>
<span style="margin-right: 10px">Nothing found</span>
</li>`
}, 100)
}
}, 100)
}
timeoutHandler = setTimeout(async () => {