diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index 4a9fd35c..f1cda178 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -103,10 +103,11 @@ class Yomichan { } ankiInvoke(action, params, pool, callback) { - if (pool !== null && this.asyncPools.hasOwnProperty(pool)) { - this.asyncPools[pool].abort(); - callback(null); - } else if (this.options.enableAnkiConnect) { + if (this.options.enableAnkiConnect) { + if (pool !== null && this.asyncPools.hasOwnProperty(pool)) { + this.asyncPools[pool].abort(); + } + const xhr = new XMLHttpRequest(); xhr.addEventListener('loadend', () => { if (pool !== null) {