From: Chris Duncan Date: Wed, 5 Aug 2026 06:56:22 +0000 (-0700) Subject: Assert data properties so they can be cleared. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7b6fc1b721f39963bef526c3a95fd3d71583183b;p=libnemo.git Assert data properties so they can be cleared. --- diff --git a/src/lib/vault/parsers.ts b/src/lib/vault/parsers.ts index e140e51..b703afa 100644 --- a/src/lib/vault/parsers.ts +++ b/src/lib/vault/parsers.ts @@ -49,7 +49,7 @@ export function parseData (action: string, data: Record) { } 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) { } 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) { } message = data.message.slice() } - new Uint8Array(data.message ?? []).fill(0) + new Uint8Array(data.message as ArrayBuffer).fill(0) delete data.message // Vault configuration