[open-ils-commits] r12786 - branches/rel_1_4_0/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 3 16:02:48 EDT 2009
Author: phasefx
Date: 2009-04-03 16:02:44 -0400 (Fri, 03 Apr 2009)
New Revision: 12786
Modified:
branches/rel_1_4_0/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
Fix hold shelf display for solitary item. We expect an array here, but if the array only has one element, then RemoteRequest is just returning that element
Modified: branches/rel_1_4_0/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- branches/rel_1_4_0/Open-ILS/xul/staff_client/server/patron/holds.js 2009-04-03 20:02:37 UTC (rev 12785)
+++ branches/rel_1_4_0/Open-ILS/xul/staff_client/server/patron/holds.js 2009-04-03 20:02:44 UTC (rev 12786)
@@ -1031,7 +1031,15 @@
holds = holds.sort();
}
} else {
- holds = robj == null ? [] : robj;
+ if (robj == null ) {
+ holds = [];
+ } else {
+ if (typeof robj.length == 'undefined') {
+ holds = [ robj ];
+ } else {
+ holds = robj;
+ }
+ }
}
//alert('method = ' + method + ' params = ' + js2JSON(params));
}
More information about the open-ils-commits
mailing list