Clean up toast logic in AppActions
parent
f65b6472dd
commit
a8ee090fea
|
@ -43,9 +43,13 @@ export default Actions({
|
|||
toast(args) {
|
||||
return {
|
||||
transform(state) {
|
||||
const id = state.toast && state.toast.id ? state.toast.id : 0;
|
||||
const toast = { ...args, id: id + 1 };
|
||||
return { ...state, toast };
|
||||
return {
|
||||
...state,
|
||||
toast: {
|
||||
...args,
|
||||
id: state.toast && state.toast.id ? state.toast.id : 1
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue