diff options
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r-- | ext/bg/js/yomichan.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index c641bf6b..25dbc23c 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -23,9 +23,9 @@ class Yomichan { Handlebars.registerHelper('kanjiLinks', kanjiLinks); this.translator = new Translator(); + this.anki = new AnkiConnect(); this.options = null; this.importTabId = null; - this.anki = new AnkiConnect(this.getApiVersion()); this.setState('disabled'); chrome.runtime.onMessage.addListener(this.onMessage.bind(this)); @@ -248,7 +248,6 @@ class Yomichan { this.anki.canAddNotes(notes).then(results => { const states = []; - if (results !== null) { for (let resultBase = 0; resultBase < results.length; resultBase += modes.length) { const state = {}; @@ -269,7 +268,7 @@ class Yomichan { } api_getModelNames({callback}) { - this.anki.getModelFieldNames().then(callback); + this.anki.getModelNames().then(callback); } api_getModelFieldNames({modelName, callback}) { |