diff --git a/js/listWorker.js b/js/listWorker.js index 2a0f71ed..c89f56bc 100644 --- a/js/listWorker.js +++ b/js/listWorker.js @@ -213,7 +213,7 @@ class Model { // BirdNET nocturnal bird filter for (let i = 0; i < this.labels.length; i++) { const item = this.labels[i]; - if (ACTIVITY_INDEX[item] !== 1 && BIRDNET_NOT_BIRDS.indexOf(item) !== -1) includedIDs.push(i); + if (ACTIVITY_INDEX[item] !== 1 && BIRDNET_NOT_BIRDS.indexOf(item) < 0) includedIDs.push(i); } } } else { diff --git a/js/ui.js b/js/ui.js index aebea80a..3577ef3c 100644 --- a/js/ui.js +++ b/js/ui.js @@ -39,27 +39,27 @@ const os = window.module.os; let worker; const establishMessageChannel = - new Promise((resolve) => { - window.onmessage = (event) => { - // event.source === window means the message is coming from the preload - // script, as opposed to from an