File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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 {
7373 className = { wrapperClassName + ' lazy-load-image-background ' +
7474 effect + loadedClassName }
7575 style = { {
76- backgroundImage : loaded ? '' : ' url( ' + placeholderSrc + ')' ,
77- backgroundSize : loaded ? '' : '100% 100%' ,
76+ backgroundImage : loaded || ! placeholderSrc ? '' : ` url(${ placeholderSrc } )` ,
77+ backgroundSize : loaded || ! placeholderSrc ? '' : '100% 100%' ,
7878 color : 'transparent' ,
7979 display : 'inline-block' ,
8080 height : height ,
@@ -120,7 +120,7 @@ LazyLoadImage.defaultProps = {
120120 delayMethod : 'throttle' ,
121121 delayTime : 300 ,
122122 effect : '' ,
123- placeholderSrc : '' ,
123+ placeholderSrc : null ,
124124 threshold : 100 ,
125125 useIntersectionObserver : true ,
126126 visibleByDefault : false ,
You can’t perform that action at this time.
0 commit comments