Fix error alerts for deleted quotes (#35918)
This commit is contained in:
parent
8777443c9b
commit
1faf520ce4
6 changed files with 62 additions and 19 deletions
|
|
@ -73,8 +73,15 @@ export default function statuses(state = initialState, action) {
|
|||
switch(action.type) {
|
||||
case STATUS_FETCH_REQUEST:
|
||||
return state.setIn([action.id, 'isLoading'], true);
|
||||
case STATUS_FETCH_FAIL:
|
||||
return state.delete(action.id);
|
||||
case STATUS_FETCH_FAIL: {
|
||||
if (action.parentQuotePostId && action.error.status === 404) {
|
||||
return state
|
||||
.delete(action.id)
|
||||
.setIn([action.parentQuotePostId, 'quote', 'state'], 'deleted')
|
||||
} else {
|
||||
return state.delete(action.id);
|
||||
}
|
||||
}
|
||||
case STATUS_IMPORT:
|
||||
return importStatus(state, action.status);
|
||||
case STATUSES_IMPORT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue