fix: clear image placeholder after failed load
This commit is contained in:
1 parent
1d19ea0eb8
commit
161f2efd13
1 file changed
+1
-1
@@ -20,7 +20,7 @@ function isPending(img) {
|
||||
if (img.hasAttribute("data-src") || img.hasAttribute("data-defer-src")) return true;
|
||||
const src = img.currentSrc || img.getAttribute("src") || "";
|
||||
if (isTinyPlaceholderSrc(src)) return true;
|
||||
return !img.complete || img.naturalWidth === 0;
|
||||
return !img.complete;
|
||||
}
|
||||
|
||||
function getHost(img) {
|
||||
|
||||
Reference in new issue
Block a user