mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-19 05:37:42 +00:00
fix: Handle errors without response (#4274)
This commit is contained in:
parent
bbdcfd6baf
commit
015269914e
|
@ -113,7 +113,7 @@ export function fetchContext(id) {
|
||||||
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
|
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.response.status === 404) {
|
if (error.response && error.response.status === 404) {
|
||||||
dispatch(deleteFromTimelines(id));
|
dispatch(deleteFromTimelines(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ export function refreshTimelineFail(timeline, error, skipLoading) {
|
||||||
timeline,
|
timeline,
|
||||||
error,
|
error,
|
||||||
skipLoading,
|
skipLoading,
|
||||||
skipAlert: error.response.status === 404,
|
skipAlert: error.response && error.response.status === 404,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue