Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
fix (gallery): trigger print via defined key only if gallery is defined
Browse files Browse the repository at this point in the history
Change-Id: I2c3ee43d1fb091ba0a3f351d74ad2dc22e3f59c1
  • Loading branch information
andi34 committed Sep 27, 2020
1 parent 5e970b2 commit b3bee97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/photoinit.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function initPhotoSwipeFromDOM(gallerySelector) {
if (config.use_print_gallery && config.print_key && parseInt(config.print_key, 10) === ev.keyCode) {
if (isPrinting) {
console.log('Printing already in progress!');
} else {
} else if ($('#gallery').hasClass('gallery--open') && typeof gallery !== 'undefined') {
$('.pswp__button--print').trigger('click');
}
}
Expand Down

0 comments on commit b3bee97

Please sign in to comment.