Skip to content

Commit

Permalink
pages now refresh if they get an error from server
Browse files Browse the repository at this point in the history
  • Loading branch information
misaugstad committed May 14, 2024
1 parent c469d59 commit eef8a62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion public/javascripts/SVLabel/src/SVLabel/data/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ function Form (labelContainer, missionModel, missionContainer, navigationModel,
}
},
error: function (result) {
console.error(result);
// console.error(result);
window.location.reload(); // Refresh the page in case the server has gone down.
}
});
};
Expand Down
5 changes: 3 additions & 2 deletions public/javascripts/SVValidate/src/data/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ function Form(url, beaconUrl) {
}
},
error: function (xhr, status, result) {
console.error(xhr.responseText);
console.error(result);
// console.error(xhr.responseText);
// console.error(result);
window.location.reload(); // Refresh the page in case the server has gone down.
}
});
}
Expand Down

0 comments on commit eef8a62

Please sign in to comment.