mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Merge pull request #3145 from MetaMask/i3089-FixNullError
Add warning when importing no valid file
This commit is contained in:
commit
1a32690a12
@ -2,6 +2,8 @@
|
||||
|
||||
## Current Master
|
||||
|
||||
- Add warning for importing some kinds of files.
|
||||
|
||||
## 3.13.8 2018-1-29
|
||||
|
||||
- Fix provider for Kovan network.
|
||||
|
@ -81,6 +81,12 @@ JsonImportSubview.prototype.createKeyringOnEnter = function (event) {
|
||||
|
||||
JsonImportSubview.prototype.createNewKeychain = function () {
|
||||
const state = this.state
|
||||
|
||||
if (!state) {
|
||||
const message = 'You must select a valid file to import.'
|
||||
return this.props.dispatch(actions.displayWarning(message))
|
||||
}
|
||||
|
||||
const { fileContents } = state
|
||||
|
||||
if (!fileContents) {
|
||||
|
Loading…
Reference in New Issue
Block a user