https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42912

--- Comment #3 from Jonathan Druart <[email protected]> ---
Created attachment 200966
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200966&action=edit
Bug 42912: Fix Uncaught TypeError on opac-readingrecord when no Checkout
history

This prevents an 'Uncaught TypeError: can't access property "DataTable", table
is undefined' when a patron has no items checked out yet and is visiting
opac-readingrecord.
The code now checks if table is defined before accessing its properties.

Testplan:
a) log in in opac, open dev console
b) go to /cgi-bin/koha/opac-readingrecord.pl
c) without patch applied the error above occurs
d) apply patch and reload opac-readingrecord.pl, there should not be any error
now
e) check out an item in staff to that patron and check that the table on
opac-readingrecord.pl is diplayed

Signed-off-by: Jonathan Druart <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to