Skip to content

Commit

Permalink
fix: invalid destructuring of undefined object (#7200)
Browse files Browse the repository at this point in the history
  • Loading branch information
abretonc7s authored Sep 12, 2023
1 parent 80eab2d commit 2fbafdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/core/RPCMethods/wallet_switchEthereumChain.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ const wallet_switchEthereumChain = async ({
return;
}

const [networkConfigurationId, networkConfiguration] = existingEntry;
let networkConfigurationId, networkConfiguration;
if (existingEntry) {
[networkConfigurationId, networkConfiguration] = existingEntry;
}

let requestData;
let analyticsParams = {
Expand Down

0 comments on commit 2fbafdf

Please sign in to comment.