]> git.codecow.com Git - libnemo.git/commitdiff
Check that navigator exists in test environment before dereferencing.
authorChris Duncan <chris@zoso.dev>
Tue, 9 Sep 2025 21:24:25 +0000 (14:24 -0700)
committerChris Duncan <chris@zoso.dev>
Tue, 9 Sep 2025 21:24:25 +0000 (14:24 -0700)
test/test.ledger.mjs

index 3b39498c75922acacd704482051f28ba978e5ae9..ab87f59ecbf8a02fb0251f41f55699b03dae0718 100644 (file)
@@ -37,7 +37,7 @@ const rpc = new Rpc(env.NODE_URL ?? '', env.API_KEY_NAME)
 */
 await Promise.all([
        /* node:coverage disable */
-       suite('Ledger hardware wallet', { skip: false || isNode || navigator.usb == null }, async () => {
+       suite('Ledger hardware wallet', { skip: false || isNode || navigator?.usb == null }, async () => {
 
                const { OPEN_BLOCK, RECEIVE_BLOCK, SEND_BLOCK } = NANO_TEST_VECTORS
                let wallet, account, openBlock, sendBlock, receiveBlock