From: Chris Duncan Date: Wed, 5 Aug 2026 06:40:28 +0000 (-0700) Subject: Enable type narrowing which does not work with Array.includes(). X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=1ffd4c929c0169f8a5abe53499b4f74fcf0896f7;p=libnemo.git Enable type narrowing which does not work with Array.includes(). --- diff --git a/src/lib/vault/vault-worker.ts b/src/lib/vault/vault-worker.ts index d298fb3..e0e1224 100644 --- a/src/lib/vault/vault-worker.ts +++ b/src/lib/vault/vault-worker.ts @@ -271,7 +271,7 @@ function unlock (type?: WalletType, id?: UUID, key?: CryptoKey, iv?: ArrayBuffer if (type == null) { throw new TypeError('Wallet type is required') } - if (!['BIP-44', 'BLAKE2b', 'Exodus'].includes(type)) { + if (type !== 'BIP-44' && type !== 'BLAKE2b' && type !== 'Exodus') { throw new TypeError('Invalid wallet type', { cause: type }) } if (id == null) {