]> git.codecow.com Git - libnemo.git/commitdiff
Assert data properties so they can be cleared.
authorChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 06:56:22 +0000 (23:56 -0700)
committerChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 06:56:22 +0000 (23:56 -0700)
src/lib/vault/parsers.ts

index e140e5140d680b785793a2a96ca7e731d62563b7..b703afa4c00f012a152a39622fbcc566f40310a5 100644 (file)
@@ -49,7 +49,7 @@ export function parseData (action: string, data: Record<string, unknown>) {
                        }
                        seed = data.seed.slice()
                }
-               new Uint8Array(data.seed ?? []).fill(0)
+               new Uint8Array(data.seed as ArrayBuffer).fill(0)
                delete data.seed
 
                // Mnemonic phrase to load
@@ -80,7 +80,7 @@ export function parseData (action: string, data: Record<string, unknown>) {
                        }
                        encrypted = data.encrypted.slice()
                }       
-               new Uint8Array(data.encrypted ?? []).fill(0)
+               new Uint8Array(data.encrypted as ArrayBuffer).fill(0)
                delete data.encrypted
 
                // Index for child account to derive or sign
@@ -101,7 +101,7 @@ export function parseData (action: string, data: Record<string, unknown>) {
                        }
                        message = data.message.slice()
                }
-               new Uint8Array(data.message ?? []).fill(0)
+               new Uint8Array(data.message as ArrayBuffer).fill(0)
                delete data.message
 
                // Vault configuration