]> git.codecow.com Git - libnemo.git/commitdiff
Wrap storage retrieval in try-catch.
authorChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 17:02:08 +0000 (10:02 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 17:02:08 +0000 (10:02 -0700)
src/lib/workers/safe.ts

index e30c2c08af865d6a14d342f7a4425b4d4e183b1c..2e61deeacf2d4b6033ecbef2d08988f478ce1487 100644 (file)
@@ -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
                }