1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Fix undefined provider menu item

This commit is contained in:
Dan Finlay 2016-11-22 16:34:02 -08:00
parent 822face7a3
commit 1e46d858e9

View File

@ -258,7 +258,7 @@ App.prototype.renderNetworkDropdown = function () {
activeNetworkRender: props.provider.rpcTarget,
}),
this.renderCustomOption(props.provider.rpcTarget),
this.renderCustomOption(props.provider),
h(DropMenuItem, {
label: 'Custom RPC',
@ -480,7 +480,10 @@ App.prototype.toggleMetamaskActive = function () {
}
}
App.prototype.renderCustomOption = function (rpcTarget) {
App.prototype.renderCustomOption = function (provider) {
const { rpcTarget, type } = provider
if (type !== 'rpc') return null
switch (rpcTarget) {
case 'http://localhost:8545':