]> git.codecow.com Git - libnemo.git/commitdiff
Fix deletion not waiting for DML to complete.
authorChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 20:28:54 +0000 (13:28 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 20:28:54 +0000 (13:28 -0700)
src/lib/workers/safe.ts

index cdda1195fc0c7641e63b9e5245b595b30607e69b..1cc4918f3123b624420e288913d070ad89df9a12 100644 (file)
@@ -216,7 +216,8 @@ export class Safe extends WorkerInterface {
 
        static async #delete (name: string): Promise<boolean> {
                try {
-                       return await this.#transact<undefined>('readwrite', db => db.delete(name)) === undefined
+                       const result = await this.#transact<undefined>('readwrite', db => db.delete(name))
+                       return !(await this.#exists(name))
                } catch {
                        throw new Error(this.ERR_MSG)
                }