Bug 21078: overdrive.js Catch error if window.opener is not accessible
To Test: 0 - Enable overdrive search results on your koha 1 - From a source develop a link to your koha instance that opens a new window: <a target="_blank" href="http://localhost:8080/cgi-bin/koha/opac-search.pl?q=love">Test</a> 2 - Click that link 3 - Note Overdrive results do not load 4 - Note error in JS console 5 - Apply patch 6 - Click the link again 7 - Note OD results load 8 - Note no error in console Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
8df47bdde6
commit
6975a6836a
|
|
@ -86,7 +86,8 @@ KOHA.OverDriveCirculation = new function() {
|
|||
$( document ).ready(function() {
|
||||
var p = window.opener;
|
||||
if (p) {
|
||||
cb = p.refresh_overdrive_account_details;
|
||||
try { cb = p.refresh_overdrive_account_details;}
|
||||
catch(err){ return; } //Catch error if opener is not accessible
|
||||
if (cb) {
|
||||
cb();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue