SVG srcset hotfix

This commit is contained in:
alistair3149 2019-08-15 14:05:50 -04:00
parent da7c4d5ff0
commit 36f6c94ec1

View file

@ -16,7 +16,7 @@ if( typeof IntersectionObserver !== "undefined" && "forEach" in NodeList.prototy
changes.forEach(function(change) {
if(change.isIntersecting) {
change.target.setAttribute("src", change.target.getAttribute("data-src"));
if(change.target.hasAttribute("srcset")) {
if(change.target.hasAttribute("data-srcset")) {
change.target.setAttribute("srcset", change.target.getAttribute("data-srcset"));
}
observer.unobserve(change.target);