Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit faa996c

Browse files
authored
fix: Default to null height instead of 0
correction for pull request #66, use 'null' instead of '0'
2 parents f57bedb + baccb9f commit faa996c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/react-image-lightbox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,8 +1321,8 @@ class ReactImageLightbox extends Component {
13211321
return;
13221322
}
13231323

1324-
imageStyle.width = (isNaN(bestImageInfo.width)) ? 0 : bestImageInfo.width;
1325-
imageStyle.height = (isNaN(bestImageInfo.height)) ? 0 : bestImageInfo.height;
1324+
imageStyle.width = isNaN(bestImageInfo.width) ? null : bestImageInfo.width;
1325+
imageStyle.height = isNaN(bestImageInfo.height) ? null : bestImageInfo.height;
13261326

13271327
const imageSrc = bestImageInfo.src;
13281328
if (discourageDownloads) {

0 commit comments

Comments
 (0)