aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/yomichan.js9
1 files changed, 5 insertions, 4 deletions
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) {