This commit is contained in:
Alex Yatskov 2016-05-06 21:42:15 -07:00
parent 7015b80469
commit 8c1ebe6bcb

View File

@ -103,10 +103,11 @@ class Yomichan {
} }
ankiInvoke(action, params, pool, callback) { ankiInvoke(action, params, pool, callback) {
if (pool !== null && this.asyncPools.hasOwnProperty(pool)) { if (this.options.enableAnkiConnect) {
this.asyncPools[pool].abort(); if (pool !== null && this.asyncPools.hasOwnProperty(pool)) {
callback(null); this.asyncPools[pool].abort();
} else if (this.options.enableAnkiConnect) { }
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
xhr.addEventListener('loadend', () => { xhr.addEventListener('loadend', () => {
if (pool !== null) { if (pool !== null) {