aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/dictionary-database.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/dictionary-database.js')
-rw-r--r--ext/bg/js/dictionary-database.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/bg/js/dictionary-database.js b/ext/bg/js/dictionary-database.js
index c6798fb3..55fc0915 100644
--- a/ext/bg/js/dictionary-database.js
+++ b/ext/bg/js/dictionary-database.js
@@ -117,8 +117,15 @@ class DictionaryDatabase {
if (this._db.isOpen()) {
this._db.close();
}
- await Database.deleteDatabase(this._dbName);
+ let result = false;
+ try {
+ await Database.deleteDatabase(this._dbName);
+ result = true;
+ } catch (e) {
+ yomichan.logError(e);
+ }
await this.prepare();
+ return result;
}
async deleteDictionary(dictionaryName, progressSettings, onProgress) {