From: Chris Duncan Date: Thu, 3 Jul 2025 17:02:08 +0000 (-0700) Subject: Wrap storage retrieval in try-catch. X-Git-Tag: v0.10.5~136^2~19 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=014b479c4286db73df72f6985f7b0deb17e00d35;p=libnemo.git Wrap storage retrieval in try-catch. --- diff --git a/src/lib/workers/safe.ts b/src/lib/workers/safe.ts index e30c2c0..2e61dee 100644 --- a/src/lib/workers/safe.ts +++ b/src/lib/workers/safe.ts @@ -156,7 +156,12 @@ export class Safe extends WorkerInterface { return null } - const item = this.#storage.getItem(name) + let item + try { + item = this.#storage.getItem(name) + } catch { + return null + } if (item == null) { return null }