Add check for source when loading images

This commit is contained in:
MrTimscampi 2020-05-02 19:44:27 +02:00
parent a7fe198329
commit 28f575755b

View file

@ -24,7 +24,7 @@ import 'css!./style';
} }
if (entry.intersectionRatio > 0) { if (entry.intersectionRatio > 0) {
fillImageElement(entry.target, source); if (source) fillImageElement(entry.target, source);
} else if (!source) { } else if (!source) {
emptyImageElement(entry.target); emptyImageElement(entry.target);
} }