Bug 40127: Remove JS error from the biblio detail page when no items
"build_items_table is not defined" We should not try to build the items table if there are no items. Test plan: Go to the bibliographic detail page of a biblio without items You should not see errors in the browser's console Go to the bibliographic detail page of a biblio with items You should not see errors in the browser's console The table should be displayed and the different features should work as before Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit561535503c) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> (cherry picked from commitce72073ff5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
80da7586dc
commit
fda49309c0
|
|
@ -1686,7 +1686,7 @@
|
|||
items_tab_ids.forEach( function( tab_id, index ) {
|
||||
|
||||
// Early return if the tab is not shown (ie. no table)
|
||||
if (!$("#%s-tab".format(tab_id)).length) return;
|
||||
if (!$("#%s_table".format(tab_id)).length) return;
|
||||
[% IF Koha.Preference('AlwaysShowHoldingsTableFilters') %]
|
||||
build_items_table(tab_id, true, {}, build_items_table_drawncallback);
|
||||
[% ELSE %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue