summaryrefslogtreecommitdiff
path: root/ext/js/language/dictionary-importer.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-08-07 15:25:00 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-08-08 16:04:57 -0400
commit4341b5078343dccc3b082a496fd6c158b872fc99 (patch)
tree2e175f3f25c4ef14438fe9a28f7c8fe9a1b6d549 /ext/js/language/dictionary-importer.js
parentb590a147015df21eec02054eb542ff23f2a4c0ef (diff)
Fix data not being persisted after terminating Worker thread (#1877)
Diffstat (limited to 'ext/js/language/dictionary-importer.js')
-rw-r--r--ext/js/language/dictionary-importer.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/js/language/dictionary-importer.js b/ext/js/language/dictionary-importer.js
index 89417ca6..8d6dcb33 100644
--- a/ext/js/language/dictionary-importer.js
+++ b/ext/js/language/dictionary-importer.js
@@ -149,6 +149,10 @@ class DictionaryImporter {
this._progressData.index += count;
this._progress();
}
+
+ // This function is required in order to make the added data persist after the worker is terminated.
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1237686
+ await dictionaryDatabase.persistData(objectStoreName);
};
await bulkAdd('terms', termList);