When the page has no images, the plugin wait for the maxTime to complete, instead of just completing right away.
Example:
http://jsbin.com/dureti/edit?html,output - Contains 1 image, loads pretty fast.
http://jsbin.com/henaba/edit?html,output - Has no images, takes really long time to complete.
What if we add a check after getImageSrcs function on
|
this.sources = this.getImageSrcs(element); |
if (this.sources.length === 0) {
this.done === true;
this.updateProgress();
}
When the page has no images, the plugin wait for the
maxTimeto complete, instead of just completing right away.Example:
http://jsbin.com/dureti/edit?html,output - Contains 1 image, loads pretty fast.
http://jsbin.com/henaba/edit?html,output - Has no images, takes really long time to complete.
What if we add a check after
getImageSrcsfunction onqueryloader2/src/ImagePreloader/index.js
Line 29 in 183e0c0