[open-ils-commits] r12784 - trunk/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:36 EDT 2009


Author: phasefx
Date: 2009-04-03 16:02:31 -0400 (Fri, 03 Apr 2009)
New Revision: 12784

Modified:
   trunk/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: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2009-04-03 19:14:21 UTC (rev 12783)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2009-04-03 20:02:31 UTC (rev 12784)
@@ -1063,7 +1063,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