bug 5482: if there are no json object returned, just continue instead of erroring out on the javascript.

This commit is contained in:
will 2011-01-05 18:16:16 -08:00
parent 68d5c0919a
commit 033d2d993d
1 changed files with 8 additions and 4 deletions

View File

@ -1073,11 +1073,15 @@ function handleErrorInDialog2(errorMsg, $thisDialog) {
}
function parseXMLHttpResponse(XMLHttpResponse) {
var property;
var json = jQuery.parseJSON(XMLHttpResponse.responseText);
for(property in json) {}
var errorObj = json[property];
return fromdb(errorObj.errortext);
if (json != null) {
var property;
for(property in json) {}
var errorObj = json[property];
return fromdb(errorObj.errortext);
} else {
return null;
}
}
function showLeftNavigationBasedOnRole() {