]> git.codecow.com Git - libnemo.git/commitdiff
Enable type narrowing which does not work with Array.includes().
authorChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 06:40:28 +0000 (23:40 -0700)
committerChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 06:40:28 +0000 (23:40 -0700)
src/lib/vault/vault-worker.ts

index d298fb3709484bc0323412d1189d8c33b64cf400..e0e12249f1249045893e671023f3d9a8748da27c 100644 (file)
@@ -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) {