diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 18:41:44 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 19:09:25 +0900 |
commit | b0d2b5328107a9a2018132938fb5a9efcd77fc50 (patch) | |
tree | f66bc49efc0d7ca3a6f5af3f7330f10941cbeadd /src/console/components/console.js | |
parent | f6996a2274f3293d7c5860174dd224b28877e108 (diff) |
use mode in console message
Diffstat (limited to 'src/console/components/console.js')
-rw-r--r-- | src/console/components/console.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/console/components/console.js b/src/console/components/console.js index 9023d91..b8431ce 100644 --- a/src/console/components/console.js +++ b/src/console/components/console.js @@ -72,14 +72,14 @@ export default class ConsoleComponent { update() { let state = this.store.getState(); - if (!this.prevState.commandShown && state.commandShown) { + if (this.prevState.mode !== 'command' && state.mode === 'command') { this.showCommand(state.commandText); - } else if (!state.commandShown) { + } else if (state.mode !== 'command') { this.hideCommand(); } - if (state.errorShown) { - this.setErrorText(state.errorText); + if (state.mode === 'error') { + this.setErrorText(state.messageText); this.showError(); } else { this.hideError(); |