From: Chris Duncan Date: Mon, 7 Jul 2025 13:20:50 +0000 (-0700) Subject: Compare with instanceof instead of constructor name. X-Git-Tag: v0.10.5~97 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7380f88e37265cb6b00ea722873ec8bbe00109bf;p=libnemo.git Compare with instanceof instead of constructor name. --- diff --git a/src/lib/wallets/ledger-wallet.ts b/src/lib/wallets/ledger-wallet.ts index e0a5436..f1c12b5 100644 --- a/src/lib/wallets/ledger-wallet.ts +++ b/src/lib/wallets/ledger-wallet.ts @@ -404,7 +404,7 @@ export class LedgerWallet extends Wallet { */ async updateCache (index: number, hash: string, rpc: Rpc): Promise async updateCache (index: number, input: any, node?: Rpc): Promise { - if (typeof input === 'string' && node?.constructor === Rpc) { + if (typeof input === 'string' && node instanceof Rpc) { const data = { 'json_block': 'true', 'hash': input