Bug 16857: Check on item.branches makes more sense

The test should be on the existence of the item.branches
method/attribute

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-07-07 16:40:47 +01:00 committed by Kyle M Hall
parent abb7980004
commit f38bcf5505

View file

@ -267,7 +267,7 @@ $(document).ready(function() {
<td>[% item.code |html %]</td>
<td>[% item.description %]</td>
<td>
[% IF ( item.branches.size && item.branches.size > 0 ) %]
[% IF ( item.branches && item.branches.size > 0 ) %]
[% branches_str = "" %]
[% FOREACH branch IN item.branches %]
[% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]