[Koha-bugs] [Bug 21257] Patrons checkout table throws JS error when location/collection not defined
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Aug 24 21:17:13 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21257
--- Comment #3 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
It works but I am wondering if we should not use the same method for/as lost
and damaged.
So either in the controller, init the var with an empty string instead of
undef, or in the js:
if ( oObj.damaged ) {
due += "<span class='dmg'>" + oObj.damaged.escapeHtml() + "</span>";
}
VS
{
"mDataProp": function ( oObj ) {
return oObj.location.escapeHtml();
}
},
As escapeHtml does not handle undef I think we should do the check in the js
instead, like:
{
"mDataProp": function ( oObj ) {
return ( oObj.location ? oObj.location.escapeHtml() : '' )
}
},
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list