Fixing alerts to not show already handled alerts.
This commit is contained in:
@@ -190,11 +190,12 @@ export default function(state = initialState, action) {
|
||||
case MARK_ACTION_CHANGE_HANDLED:
|
||||
return { ...state, ui: { ...state.ui, actionChangeHandled: true }};
|
||||
case ALERT:
|
||||
let existingAlert = state.ui.alerts[action.id];
|
||||
let alerts = { ...state.ui.alerts,
|
||||
[action.id]: { type: action.value,
|
||||
id: action.id,
|
||||
contents: action.contents,
|
||||
handled: false }
|
||||
handled: existingAlert ? existingAlert.handled : false }
|
||||
};
|
||||
return { ...state, ui: { ...state.ui,
|
||||
alerts,
|
||||
|
||||
Reference in New Issue
Block a user