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 commit 561535503c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
7c33240af2
commit
ce72073ff5
|
|
@ -1734,7 +1734,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