[open-ils-commits] r11954 - trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Jan 25 18:16:58 EST 2009
Author: phasefx
Date: 2009-01-25 18:16:53 -0500 (Sun, 25 Jan 2009)
New Revision: 11954
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
Log:
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)
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js 2009-01-25 22:09:50 UTC (rev 11953)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js 2009-01-25 23:16:53 UTC (rev 11954)
@@ -445,11 +445,11 @@
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. ');
More information about the open-ils-commits
mailing list