uploads: handle server errors nicer

This commit is contained in:
Marcin Kuzminski 2019-10-15 18:51:12 +02:00
parent fe51098720
commit 0a2c47d444
2 changed files with 2 additions and 2 deletions

View file

@ -729,7 +729,7 @@ var CommentsController = function() {
if (xhr !== undefined){
var httpStatus = xhr.status + " " + xhr.statusText;
if (xhr.status >= 500) {
if (xhr !== undefined && xhr.status >= 500) {
error = httpStatus;
}
}

View file

@ -170,7 +170,7 @@
if (xhr !== undefined){
var httpStatus = xhr.status + " " + xhr.statusText;
if (xhr.status >= 500) {
if (xhr !== undefined && xhr.status >= 500) {
error = httpStatus;
}
}