[open-ils-commits] r11851 - branches/rel_1_4/Open-ILS/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 15 15:59:37 EST 2009
Author: phasefx
Date: 2009-01-15 15:59:33 -0500 (Thu, 15 Jan 2009)
New Revision: 11851
Modified:
branches/rel_1_4/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
treat null result as empty hold list
Modified: branches/rel_1_4/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- branches/rel_1_4/Open-ILS/xul/staff_client/server/patron/holds.js 2009-01-15 20:57:27 UTC (rev 11850)
+++ branches/rel_1_4/Open-ILS/xul/staff_client/server/patron/holds.js 2009-01-15 20:59:33 UTC (rev 11851)
@@ -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