mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
dont crash if data.responseJSON doesnt exist
This commit is contained in:
@@ -110,13 +110,14 @@ $(document).ready(function() {
|
||||
textStatus = err.textStatus;
|
||||
|
||||
if (data) {
|
||||
data.responseJSON.config = config;
|
||||
var status = parseInt(data.status, 10);
|
||||
if (status === 403 || status === 404 || status === 500 || status === 502 || status === 503) {
|
||||
if (status === 502) {
|
||||
status = 500;
|
||||
}
|
||||
|
||||
if (data.responseJSON) {
|
||||
data.responseJSON.config = config;
|
||||
}
|
||||
$('#footer, #content').removeClass('hide').addClass('ajaxifying');
|
||||
return renderTemplate(url, status.toString(), data.responseJSON, callback);
|
||||
} else if (status === 401) {
|
||||
|
||||
Reference in New Issue
Block a user