Skip to content

Commit

Permalink
Hide zero size.
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Mar 4, 2024
1 parent d5c9ece commit a31fff0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resource/lightgallery/js/lightgallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@
if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
const img=$currentEle.find('img')
subHtml = $currentEle.attr('title') || img.first().attr('alt');
subHtml = subHtml+ ` ${img[0].width}×${img[0].height}`
const {width,height}=img[0];
if(width>0)
subHtml = subHtml+ ` ${width}×${height}`
}
}
}
Expand Down

0 comments on commit a31fff0

Please sign in to comment.