improve condition

pull/3232/head
Aniket-Engg 2 years ago committed by Aniket
parent e29aa228d6
commit 413a3b155a
  1. 4
      apps/remix-ide/src/app/tabs/web3-provider.js

@ -35,9 +35,9 @@ export class Web3ProviderModule extends Plugin {
this.call('terminal', 'log', { value: error.message, type: 'error' } )
return reject(error.message)
} else {
const errorData = error.data ? error.data : error.message ? error.message : error
const errorData = error.data || error.message || error
// See: https://github.com/ethers-io/ethers.js/issues/901
if (!(typeof errorData === 'string' && errorData.includes("unknown method eth_chainId"))) this.call('terminal', 'log', { value: error.data ? error.data : error.message, type: 'error' } )
if (!(typeof errorData === 'string' && errorData.includes("unknown method eth_chainId"))) this.call('terminal', 'log', { value: error.data || error.message, type: 'error' } )
return reject(errorData)
}
}

Loading…
Cancel
Save