From 11a944719f52c256c585e788d064b45d08b8f5cf Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 30 Jan 2018 13:23:59 -0800 Subject: Add warning when importing no valid file Fixes #3089 --- ui/app/accounts/import/json.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui') diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js index 158a3c923..15f9816e7 100644 --- a/ui/app/accounts/import/json.js +++ b/ui/app/accounts/import/json.js @@ -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) { -- cgit