Browse Source

fix: Handle errors without response (#4274)

closed-social-v3
Sorin Davidoi 7 years ago
committed by Eugen Rochko
parent
commit
015269914e
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/javascript/mastodon/actions/statuses.js
  2. +1
    -1
      app/javascript/mastodon/actions/timelines.js

+ 1
- 1
app/javascript/mastodon/actions/statuses.js 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
app/javascript/mastodon/actions/timelines.js 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,
};
};

Loading…
Cancel
Save