Skip to content
Snippets Groups Projects
Commit dfd4a42b authored by Rakib Hasan's avatar Rakib Hasan
Browse files

added if else clause in fetchContext

So that if we get an error, then we will
only delete status if it is an 404 error
parent 910df0f7
No related branches found
No related tags found
No related merge requests found
......@@ -103,8 +103,12 @@ export function fetchContext(id) {
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
dispatch(fetchStatusCard(id));
}).catch(error => {
dispatch(deleteStatusSuccess(id));
dispatch(deleteFromTimelines(id));
if (error.response.status == 404){
dispatch(deleteStatusSuccess(id));
dispatch(deleteFromTimelines(id));
}else{
dispatch(fetchContextFail(id, error));
}
});
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment