LP#860845 hold placement UI can break
authorJason Etheridge <jason@esilibrary.com>
Tue, 27 Sep 2011 19:42:49 +0000 (15:42 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 4 Nov 2011 21:39:21 +0000 (17:39 -0400)
hold placement UI can break and give misleading error on Submit

Adds some defensive coding, but since I don't quite grok everything going on here, may not be the best fix.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/opac/skin/default/js/holds.js

index b8a5e49..b38953d 100644 (file)
@@ -561,7 +561,9 @@ function __holdsDrawWindow() {
                                return (i.record() == holdArgs.record); 
                        }
                );
-               formats = desc[0].item_type();
+               if (desc) {
+                       formats = desc[0].item_type();
+               }
        }
 
        if( holdArgs.type == 'M' ) {