fix: Handle errors without response (#4274)

This commit is contained in:
Sorin Davidoi authored and Eugen Rochko committed 2017-07-19 19:38:50 +02:00
1 parent bbdcfd6baf
commit 015269914e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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));
}
+1 -1
View File
@@ -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,
};
};