Skip to content
Snippets Groups Projects
Commit 29851269 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 0ef58557
No related merge requests found
......@@ -198,7 +198,9 @@ VuFind.register('lightbox', function Lightbox() {
* data-lightbox-title = Lightbox title (overrides any title the page provides)
*/
_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;
}
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