handle null's in the start-up sequence (we have a pcrud call in there now and it...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 25 Jan 2009 23:16:53 +0000 (23:16 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 25 Jan 2009 23:16:53 +0000 (23:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11954 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js

index 1993489..9cb5c9c 100644 (file)
@@ -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. ');