File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ class LazyLoadImage extends React.Component {
73
73
className = { wrapperClassName + ' lazy-load-image-background ' +
74
74
effect + loadedClassName }
75
75
style = { {
76
- backgroundImage : loaded ? '' : ' url( ' + placeholderSrc + ')' ,
77
- backgroundSize : loaded ? '' : '100% 100%' ,
76
+ backgroundImage : loaded || ! placeholderSrc ? '' : ` url(${ placeholderSrc } )` ,
77
+ backgroundSize : loaded || ! placeholderSrc ? '' : '100% 100%' ,
78
78
color : 'transparent' ,
79
79
display : 'inline-block' ,
80
80
height : height ,
@@ -120,7 +120,7 @@ LazyLoadImage.defaultProps = {
120
120
delayMethod : 'throttle' ,
121
121
delayTime : 300 ,
122
122
effect : '' ,
123
- placeholderSrc : '' ,
123
+ placeholderSrc : null ,
124
124
threshold : 100 ,
125
125
useIntersectionObserver : true ,
126
126
visibleByDefault : false ,
You can’t perform that action at this time.
0 commit comments