diff --git a/js/lazyload.js b/js/lazyload.js index 269c5b0..d9a697c 100644 --- a/js/lazyload.js +++ b/js/lazyload.js @@ -89,7 +89,7 @@ LazyLoader.prototype.load = function() { this.img.getAttribute( lazySrcAttr ); let srcset = this.img.getAttribute( lazySrcsetAttr ); // set src & serset - this.img.src = src; + if ( src ) this.img.src = src; if ( srcset ) this.img.setAttribute( 'srcset', srcset ); // remove attr this.img.removeAttribute( lazyAttr );