mirror of https://github.com/tootsuite/mastodon
added if else clause in fetchContext
So that if we get an error, then we will only delete status if it is an 404 errorpull/646/head
parent
910df0f795
commit
dfd4a42b35
|
@ -103,8 +103,12 @@ export function fetchContext(id) {
|
|||
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
|
||||
dispatch(fetchStatusCard(id));
|
||||
}).catch(error => {
|
||||
if (error.response.status == 404){
|
||||
dispatch(deleteStatusSuccess(id));
|
||||
dispatch(deleteFromTimelines(id));
|
||||
}else{
|
||||
dispatch(fetchContextFail(id, error));
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue