Chore: Use optional chaining (#3795)
Use optional chaining to check `window.ethereum` object chain.
This commit is contained in:
parent
4274db67d5
commit
bd4545538d
@ -215,7 +215,7 @@ export default function WalletModal({
|
||||
|
||||
// get wallets user can switch too, depending on device/browser
|
||||
function getOptions() {
|
||||
const isMetamask = window.ethereum && window.ethereum.isMetaMask
|
||||
const isMetamask = !!window.ethereum?.isMetaMask
|
||||
return Object.keys(SUPPORTED_WALLETS).map((key) => {
|
||||
const option = SUPPORTED_WALLETS[key]
|
||||
// check for mobile options
|
||||
|
Loading…
Reference in New Issue
Block a user