From 83cb277ba2af2bc2f87ace1d97fa582a7043bcd5 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Thu, 14 Sep 2017 22:04:42 +0900 Subject: consome as store/reducers --- src/reducers/console.js | 1 - 1 file changed, 1 deletion(-) (limited to 'src/reducers/console.js') diff --git a/src/reducers/console.js b/src/reducers/console.js index 3303802..31de654 100644 --- a/src/reducers/console.js +++ b/src/reducers/console.js @@ -31,7 +31,6 @@ export default function reducer(state = defaultState, action = {}) { return Object.assign({}, state, { errorShown: false, commandShown: false - }); default: return state; -- cgit v1.2.3 From ae394e28c0cbc8710d4937238c97328afddbca0f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 16 Sep 2017 23:24:37 +0900 Subject: keep error message --- src/reducers/console.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/reducers/console.js') diff --git a/src/reducers/console.js b/src/reducers/console.js index 31de654..27ccdc9 100644 --- a/src/reducers/console.js +++ b/src/reducers/console.js @@ -28,6 +28,10 @@ export default function reducer(state = defaultState, action = {}) { commandShown: false, }); case actions.CONSOLE_HIDE: + if (state.errorShown) { + // keep error message if shown + return state; + } return Object.assign({}, state, { errorShown: false, commandShown: false -- cgit v1.2.3