Skip to content
Snippets Groups Projects
Commit ab75e9bb authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Fix lightbox error caused by missing href (#875)

- Fixed an error caused by lightbox when checking for href in attributes in _constrainLink and the a element doesn’t have a href (e.g. the confirmation links in the ”Empty Book Bag” button).
parent af5e692d
No related merge requests found
...@@ -190,7 +190,9 @@ VuFind.register('lightbox', function Lightbox() { ...@@ -190,7 +190,9 @@ VuFind.register('lightbox', function Lightbox() {
* data-lightbox-title = Lightbox title (overrides any title the page provides) * data-lightbox-title = Lightbox title (overrides any title the page provides)
*/ */
_constrainLink = function constrainLink(event) { _constrainLink = function constrainLink(event) {
if (typeof $(this).data('lightboxIgnore') != 'undefined' || this.attributes.href.value.charAt(0) === '#') { if (typeof $(this).data('lightboxIgnore') != 'undefined'
|| typeof this.attributes.href === 'undefined' || this.attributes.href.value.charAt(0) === '#'
) {
return true; return true;
} }
if (this.href.length > 1) { if (this.href.length > 1) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment