summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/core.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index ca37a26a..4314926c 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -331,14 +331,15 @@ const yomichan = (() => {
if (timeout !== null) {
timeoutId = window.setTimeout(() => {
timeoutId = null;
- reject(new Error(`Listener timed out in ${timeout} ms`));
eventHandler.removeListener(runtimeMessageCallback);
+ reject(new Error(`Listener timed out in ${timeout} ms`));
}, timeout);
}
const cleanupResolve = (value) => {
if (timeoutId !== null) {
window.clearTimeout(timeoutId);
+ timeoutId = null;
}
eventHandler.removeListener(runtimeMessageCallback);
sendResponse();