summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-05-06 21:42:15 -0700
committerAlex Yatskov <alex@foosoft.net>2016-05-06 21:42:15 -0700
commit8c1ebe6bcbc3511231c60133cd54722ae97e43ee (patch)
tree3d8654fb3304ea2a83fb22f734f7250b0296b836 /ext
parent7015b804699498999f68374a8c568665d4a24e3a (diff)
WIP
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) {