From b69edba08800bb9751914cc3b9a731de89ac7f5f Mon Sep 17 00:00:00 2001 From: Darius Jahandarie Date: Sun, 29 Dec 2024 11:53:14 +0900 Subject: [PATCH 1/2] fix broken dictionary collection import --- ext/js/dictionary/dictionary-database.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/js/dictionary/dictionary-database.js b/ext/js/dictionary/dictionary-database.js index b899c1be3..2212279e9 100644 --- a/ext/js/dictionary/dictionary-database.js +++ b/ext/js/dictionary/dictionary-database.js @@ -200,6 +200,10 @@ export class DictionaryDatabase { if (this._db.isOpen()) { this._db.close(); } + if (this._worker !== null) { + this._worker.terminate(); + this._worker = null; + } let result = false; try { await Database.deleteDatabase(this._dbName); From 9be247a0023185181fb862c6ae7034767a56fc90 Mon Sep 17 00:00:00 2001 From: Darius Jahandarie Date: Sun, 29 Dec 2024 11:58:28 +0900 Subject: [PATCH 2/2] fix tests --- test/utilities/database.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/utilities/database.js b/test/utilities/database.js index 4fdf93ad0..abc749314 100644 --- a/test/utilities/database.js +++ b/test/utilities/database.js @@ -30,6 +30,7 @@ export function setupStubs() { function Worker() { return { addEventListener: () => {}, + terminate: () => {}, }; } vi.stubGlobal('Worker', Worker);