Skip to content

Commit

Permalink
Merge pull request aFarkas#543 from seantimm/seantimm/blur-img-race-c…
Browse files Browse the repository at this point in the history
…ondition

Resolve race condition with blurImg
  • Loading branch information
Alexander Farkas authored Oct 5, 2018
2 parents 367f462 + dffa93b commit 7149273
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/blur-up/ls.blur-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@

if(blurImg){
lazySizes.rAF(function () {
lazySizes.aC(blurImg, 'ls-blur-up-loaded');
if(blurImg) {
lazySizes.aC(blurImg, 'ls-blur-up-loaded');
}
});

blurImg.removeEventListener('load', onloadBlurUp);
Expand Down

0 comments on commit 7149273

Please sign in to comment.