From: phasefx Date: Fri, 3 Apr 2009 20:02:37 +0000 (+0000) Subject: Fix hold shelf display for solitary item. We expect an array here, but if the array... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=080901d735a74e7b5bff2d31e99cc5674416b73c;p=Evergreen.git 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 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@12785 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index a5a37e8556..297d12a282 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -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)); }