improve condition

pull/5370/head
Aniket-Engg 2 years ago committed by Aniket
parent 8044e17355
commit 99488663c5
  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