From b0d2b5328107a9a2018132938fb5a9efcd77fc50 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 8 Oct 2017 18:41:44 +0900 Subject: use mode in console message --- src/console/components/console.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/console/components') 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(); -- cgit v1.2.3