diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-06-07 02:42:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 02:42:52 +0800 |
commit | 546996c1f93ba7c62983570675aedd8127d91956 (patch) | |
tree | e1a393ac09221ab677bfe554815c081679c8f369 /app | |
parent | ccd4884db112a5440e7f482f644e6729e638dc49 (diff) | |
parent | 3cc85c219ef565267093de80e709e53d57b38d4e (diff) | |
download | tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.tar tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.tar.gz tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.tar.bz2 tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.tar.lz tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.tar.xz tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.tar.zst tangerine-wallet-browser-546996c1f93ba7c62983570675aedd8127d91956.zip |
Merge pull request #4514 from whymarrh/account-label-type-check
Add account type assertion to PreferencesController#setAccountLabel
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/preferences.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index a5d8cc27b..8411e3a28 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -247,6 +247,7 @@ class PreferencesController { * @return {Promise<string>} */ setAccountLabel (account, label) { + if (!account) throw new Error('setAccountLabel requires a valid address, got ' + String(account)) const address = normalizeAddress(account) const {identities} = this.store.getState() identities[address] = identities[address] || {} |