[open-ils-commits] r11831 - trunk/Open-ILS/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 14 17:14:03 EST 2009
Author: phasefx
Date: 2009-01-14 17:13:57 -0500 (Wed, 14 Jan 2009)
New Revision: 11831
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
let the various holds list handle a null result from whatever holds method they call
Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js 2009-01-14 22:02:56 UTC (rev 11830)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js 2009-01-14 22:13:57 UTC (rev 11831)
@@ -1021,15 +1021,17 @@
break;
}
var robj = obj.network.simple_request( method, params );
- if (typeof robj.ilsevent != 'undefined') throw(robj);
+ if (robj != null && typeof robj.ilsevent != 'undefined') throw(robj);
if (method == 'FM_AHR_RETRIEVE_ALL_VIA_BRE') {
holds = [];
- holds = holds.concat( robj.copy_holds );
- holds = holds.concat( robj.volume_holds );
- holds = holds.concat( robj.title_holds );
- holds = holds.sort();
+ if (robj != null) {
+ holds = holds.concat( robj.copy_holds );
+ holds = holds.concat( robj.volume_holds );
+ holds = holds.concat( robj.title_holds );
+ holds = holds.sort();
+ }
} else {
- holds = robj;
+ holds = robj == null ? [] : robj;
}
//alert('method = ' + method + ' params = ' + js2JSON(params));
}
More information about the open-ils-commits
mailing list