diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-07-09 15:23:11 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-07-09 15:23:11 -0700 |
commit | b3984ccd54340195fc352033f61d33e4b5f492ea (patch) | |
tree | 2c75588abd020998c0745f8871a043ae48c77073 /ext/bg | |
parent | d57c5530b7ad56a7cc89782b4d186d8fddb55d86 (diff) |
cleanup
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/database.js | 14 | ||||
-rw-r--r-- | ext/bg/js/options.js | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 70aeb0d7..400ebd6a 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -35,7 +35,7 @@ class Database { } prepare() { - if (this.db !== null) { + if (!this.db) { return Promise.reject('database already initialized'); } @@ -53,7 +53,7 @@ class Database { } purge() { - if (this.db === null) { + if (!this.db) { return Promise.reject('database not initialized'); } @@ -66,7 +66,7 @@ class Database { } findTerms(term, dictionaries) { - if (this.db === null) { + if (!this.db) { return Promise.reject('database not initialized'); } @@ -96,7 +96,7 @@ class Database { } findKanji(kanji, dictionaries) { - if (this.db === null) { + if (!this.db) { return Promise.reject('database not initialized'); } @@ -124,7 +124,7 @@ class Database { } cacheTagMeta(dictionaries) { - if (this.db === null) { + if (!this.db) { return Promise.reject('database not initialized'); } @@ -148,7 +148,7 @@ class Database { } getDictionaries() { - if (this.db === null) { + if (!this.db) { return Promise.reject('database not initialized'); } @@ -156,7 +156,7 @@ class Database { } importDictionary(archive, callback) { - if (this.db === null) { + if (!this.db) { return Promise.reject('database not initialized'); } diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 5aa18366..728ddae4 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -337,7 +337,7 @@ function ankiFieldsPopulate(element, options) { const container = tab.find('tbody').empty(); const modelName = element.val(); - if (modelName === null) { + if (!modelName) { return Promise.resolve(); } |