Fix "0 holds created" message on successful hold
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 30 Sep 2011 20:55:05 +0000 (16:55 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 6 Oct 2011 16:47:54 +0000 (12:47 -0400)
Caused by results not always being an array.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/xul/staff_client/server/patron/place_hold.js

index 4c57453..5f6c103 100644 (file)
@@ -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 = {};