Bug 13618: (follow-up) Escape HTML chars in holds.js
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 13 Aug 2018 18:17:31 +0000 (15:17 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 17 Aug 2018 15:55:13 +0000 (15:55 +0000)
For biblio level holds we got:
TypeError: oObj.itemcallnumber is undefined

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/holds.js

index feafe5c..c6bc3e5 100644 (file)
@@ -47,7 +47,7 @@ $(document).ready(function() {
                     },
                     {
                         "mDataProp": function( oObj ) {
-                            return oObj.itemcallnumber.escapeHtml() || "";
+                            return oObj.itemcallnumber && oObj.itemcallnumber.escapeHtml() || "";
                         }
                     },
                     {