From: Thomas Berezansky <tsbere@mvlc.org>
Date: Fri, 30 Sep 2011 20:55:05 +0000 (-0400)
Subject: Fix "0 holds created" message on successful hold
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1dc246008f287819da7ad9107e87a5bd967dbdae;p=evergreen%2Fmasslnc.git

Fix "0 holds created" message on successful hold

Caused by results not always being an array.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
---

diff --git a/Open-ILS/xul/staff_client/server/patron/place_hold.js b/Open-ILS/xul/staff_client/server/patron/place_hold.js
index 4c57453ab7..5f6c1035be 100644
--- a/Open-ILS/xul/staff_client/server/patron/place_hold.js
+++ b/Open-ILS/xul/staff_client/server/patron/place_hold.js
@@ -74,6 +74,9 @@ function handle_results(req) {
         $('progress_meter').hidden = true;
 
         var results = req.getResultObject();
+        if(typeof(results.length) != "number") {
+            results = [results];
+        }
 
         var successes = [];
         var failures = {};