diff --git a/app/javascript/mastodon/actions/statuses.js b/app/javascript/mastodon/actions/statuses.js index 8d385715..2204e0b1 100644 --- a/app/javascript/mastodon/actions/statuses.js +++ b/app/javascript/mastodon/actions/statuses.js @@ -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)); } diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js index dd14cb1c..5c0cd93c 100644 --- a/app/javascript/mastodon/actions/timelines.js +++ b/app/javascript/mastodon/actions/timelines.js @@ -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, }; };