Fix hold shelf display for solitary item. We expect an array here, but if the array...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Apr 2009 20:02:44 +0000 (20:02 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Apr 2009 20:02:44 +0000 (20:02 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@12786 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/holds.js

index a5a37e8..297d12a 100644 (file)
@@ -1031,7 +1031,15 @@ patron.holds.prototype = {
                     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));
                }