]> git.codecow.com Git - libnemo.git/commitdiff
Appease the TypeScript gods.
authorChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 06:42:13 +0000 (23:42 -0700)
committerChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 06:42:13 +0000 (23:42 -0700)
src/lib/vault/parsers.ts

index 17909aabad7b303ff42cf85665eea6c0edc81616..26c3d9e0e1ed3177b17576c1587542b63fa3c897 100644 (file)
@@ -119,9 +119,9 @@ export function parseData (action: string, data: Record<string, unknown>) {
 
                return { seed, mnemonicPhrase, mnemonicSalt, encrypted, index, message, timeout }
        } catch (err) {
-               new Uint8Array(seed).fill(0)
-               new Uint8Array(encrypted).fill(0)
-               new Uint8Array(message).fill(0)
+               new Uint8Array(seed ?? 0).fill(0)
+               new Uint8Array(encrypted ?? 0).fill(0)
+               new Uint8Array(message ?? 0).fill(0)
                console.error(err)
                throw new Error('Failed to extract data', { cause: err })
        }