fix: Handle errors without response (#4274)

th-downstream
Sorin Davidoi 7 years ago committed by Eugen Rochko
parent 81ebd4025a
commit e6275b4ade

@ -113,7 +113,7 @@ export function fetchContext(id) {
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
}).catch(error => {
if (error.response.status === 404) {
if (error.response && error.response.status === 404) {
dispatch(deleteFromTimelines(id));
}

@ -105,7 +105,7 @@ export function refreshTimelineFail(timeline, error, skipLoading) {
timeline,
error,
skipLoading,
skipAlert: error.response.status === 404,
skipAlert: error.response && error.response.status === 404,
};
};

Loading…
Cancel
Save