Skip to content

Commit 7e6db1c

Browse files
authored
Bugfix - MaxHeight wouldn't work.
Seems like there is a bug in line 306, the code is comparing against width but we want height.
1 parent 2bf93f3 commit 7e6db1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/lightbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
303303
maxImageWidth = self.options.maxWidth;
304304
}
305-
if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) {
305+
if (self.options.maxHeight && self.options.maxHeight < maxImageHeight) {
306306
maxImageHeight = self.options.maxHeight;
307307
}
308308

0 commit comments

Comments
 (0)