Skip to content

Commit 40b61d2

Browse files
committed
Fix wrong implementation of shouldComponentUpdate that was preventing the image to load in some circumstances
1 parent f68bb93 commit 40b61d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/LazyLoadImage.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LazyLoadImage extends React.Component {
3434
}
3535

3636
shouldComponentUpdate(nextProps, nextState) {
37-
if (this.state.visible !== nextState.visible) {
37+
if (!this.state.visible) {
3838
return true;
3939
}
4040

0 commit comments

Comments
 (0)