mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Place object property retrieval inside try-catch
This commit is contained in:
parent
f0ab4ce52d
commit
69c7fe24b3
@ -58,7 +58,7 @@ class AccountDropdowns extends Component {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
this.indicateIfLoose(keyring.type),
|
this.indicateIfLoose(keyring),
|
||||||
h('span', {
|
h('span', {
|
||||||
style: {
|
style: {
|
||||||
marginLeft: '20px',
|
marginLeft: '20px',
|
||||||
@ -75,8 +75,9 @@ class AccountDropdowns extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
indicateIfLoose (type) {
|
indicateIfLoose (keyring) {
|
||||||
try { // Sometimes keyrings aren't loaded yet:
|
try { // Sometimes keyrings aren't loaded yet:
|
||||||
|
const type = keyring.type
|
||||||
const isLoose = type !== 'HD Key Tree'
|
const isLoose = type !== 'HD Key Tree'
|
||||||
return isLoose ? h('.keyring-label', 'LOOSE') : null
|
return isLoose ? h('.keyring-label', 'LOOSE') : null
|
||||||
} catch (e) { return }
|
} catch (e) { return }
|
||||||
|
Loading…
Reference in New Issue
Block a user