|
|
@@ -53,9 +53,9 @@ this.lazyLoader = this.lazyLoader || (() => {
|
|
|
}
|
|
|
});
|
|
|
observer.observe(document, { subtree: true, childList: true, attributes: true });
|
|
|
- const idleTimeoutId = await setTimeout(() => {
|
|
|
+ const idleTimeoutId = await setTimeout(async () => {
|
|
|
if (!srcAttributeChanged) {
|
|
|
- clearTimeout(timeoutId);
|
|
|
+ await clearTimeout(timeoutId);
|
|
|
lazyLoadEnd(maxTimeoutId, idleTimeoutId, observer, options, resolve);
|
|
|
}
|
|
|
}, options.maxLazyLoadImagesIdleTime * 1.2);
|