From: phasefx Date: Sun, 25 Jan 2009 23:16:53 +0000 (+0000) Subject: handle null's in the start-up sequence (we have a pcrud call in there now and it... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2a33893ccc34a741e8951b907555f38a1a26daff;p=Evergreen.git handle null's in the start-up sequence (we have a pcrud call in there now and it returns null instead of empty arrays if the data it's looking for doesn't exist) git-svn-id: svn://svn.open-ils.org/ILS/trunk@11954 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index 19934896cd..9cb5c9caed 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -445,11 +445,11 @@ OpenILS.data.prototype = { if (classname == 'aou' || classname == 'my_aou') obj.error.sdump_levels.D_SES_RESULT = false; var robj = obj.network.request( app, method, params); - if (!robj || robj.ilsevent) { + if (robj != null && typeof robj.ilsevent != 'undefined') { obj.error.standard_unexpected_error_alert('The staff client failed to retrieve expected data from this call, "' + method + '"',robj); throw(robj); } - obj.list[classname] = robj; + obj.list[classname] = robj == null ? [] : robj; obj.error.sdump_levels.D_SES_RESULT = level; convert(); obj.data_progress('Retrieved list for ' + classname + ' objects. ');