Bug 42550: Remove JS error from report list if none exist
If there are no saved SQL reports, the "rtable" variable is empty and triggers an error when called later. Uncaught TypeError: can't access property "DataTable", rtable is undefined Test plan: /cgi-bin/koha/reports/guided_reports.pl?op=list Without reports => Without this patch there is a JS error in the console => With the patch the error is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
18f1e259e2
commit
1640dc10c7
|
|
@ -2291,7 +2291,7 @@
|
|||
},
|
||||
table_settings
|
||||
);
|
||||
let table_dt = rtable.DataTable();
|
||||
let table_dt = rtable?.DataTable();
|
||||
|
||||
$("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
|
||||
tabsInit($(e.target).parent(), rtable);
|
||||
|
|
|
|||
Loading…
Reference in New Issue