diff --git a/rhodecode/public/js/src/rhodecode/comments.js b/rhodecode/public/js/src/rhodecode/comments.js --- a/rhodecode/public/js/src/rhodecode/comments.js +++ b/rhodecode/public/js/src/rhodecode/comments.js @@ -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; } } diff --git a/rhodecode/templates/files/files_upload.mako b/rhodecode/templates/files/files_upload.mako --- a/rhodecode/templates/files/files_upload.mako +++ b/rhodecode/templates/files/files_upload.mako @@ -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; } }