From: Chris Duncan Date: Sat, 27 Jun 2026 08:16:32 +0000 (-0700) Subject: Fix autolock not returning early as expected if vault already locked. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=ba9cf5fe6c8b49e58f13206457ecb8f6bd5d1a11;p=libnemo.git Fix autolock not returning early as expected if vault already locked. --- diff --git a/src/lib/vault/index.ts b/src/lib/vault/index.ts index e6190de..a57c709 100644 --- a/src/lib/vault/index.ts +++ b/src/lib/vault/index.ts @@ -116,8 +116,8 @@ export class Vault { if (typeof isLocked === 'boolean' && this.#isLocked !== isLocked) { this.#isLocked = isLocked this.dispatchEvent(new Event(isLocked ? LOCKED : UNLOCKED)) - if (id === 'autolock') return } + if (id === 'autolock') return const task = this.#tasks.get(id) if (task == null) { throw new Error(`Vault worker returned results without an associated job for ID ${id}`)