From 8a4d8eca6463d7dd846515fdd62732a419a07344 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 29 Jul 2016 12:19:15 -0700 Subject: [PATCH 1/2] Fix network name reference When adding the classic network to the menu, I left a reference to a property that is not always existent, so we needed a fallback for it. --- ui/app/components/network.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 22b11aa6c..95901fe70 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -13,7 +13,12 @@ function Network () { Network.prototype.render = function () { const props = this.props const networkNumber = props.network - const providerName = props.provider.type + let providerName + try { + providerName = props.provider.type + } catch (e) { + providerName = null + } let iconName, hoverText if (networkNumber === 'loading') { From c7691b7e64597b873da706d842e360f3e2ec8347 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 29 Jul 2016 12:22:39 -0700 Subject: [PATCH 2/2] Fix reference in drop menu item --- ui/app/components/drop-menu-item.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 8bff3e131..1a0d6cbd5 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -34,14 +34,15 @@ DropMenuItem.prototype.render = function () { DropMenuItem.prototype.activeNetworkRender = function () { let activeNetwork = this.props.activeNetworkRender let { provider } = this.props + let providerType = provider ? provider.type : null if (activeNetwork === undefined) return switch (this.props.label) { case 'Main Ethereum Network': - if (provider.type === 'mainnet') return h('.check', '✓') + if (providerType === 'mainnet') return h('.check', '✓') break case 'Ethereum Classic Network': - if (provider.type === 'classic') return h('.check', '✓') + if (providerType === 'classic') return h('.check', '✓') break case 'Morden Test Network': if (activeNetwork === '2') return h('.check', '✓')