From 69c7fe24b3f14a885bb2ff0bb936d1a35b521de3 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Thu, 7 Sep 2017 12:17:36 -0700 Subject: Place object property retrieval inside try-catch --- ui/app/components/account-dropdowns.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/app') diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js index a53f3399d..b087a40d4 100644 --- a/ui/app/components/account-dropdowns.js +++ b/ui/app/components/account-dropdowns.js @@ -58,7 +58,7 @@ class AccountDropdowns extends Component { }, }, ), - this.indicateIfLoose(keyring.type), + this.indicateIfLoose(keyring), h('span', { style: { marginLeft: '20px', @@ -75,8 +75,9 @@ class AccountDropdowns extends Component { }) } - indicateIfLoose (type) { + indicateIfLoose (keyring) { try { // Sometimes keyrings aren't loaded yet: + const type = keyring.type const isLoose = type !== 'HD Key Tree' return isLoose ? h('.keyring-label', 'LOOSE') : null } catch (e) { return } -- cgit v1.2.3