فهرست منبع

fix useless timeout when `loadDeferredImages` is `false`

Gildas 2 سال پیش
والد
کامیت
ea1eeacdb3
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/core/content/content.js

+ 1 - 1
src/core/content/content.js

@@ -175,7 +175,7 @@ async function processPage(options) {
 		if (!options.removeFrames && frames && globalThis.frames) {
 			let frameTreePromise;
 			if (options.loadDeferredImages) {
-				frameTreePromise = new Promise(resolve => globalThis.setTimeout(() => resolve(frames.getAsync(options)), options.loadDeferredImagesBeforeFrames ? 0 : options.loadDeferredImagesMaxIdleTime));
+				frameTreePromise = new Promise(resolve => globalThis.setTimeout(() => resolve(frames.getAsync(options)), options.loadDeferredImagesBeforeFrames || !options.loadDeferredImages ? 0 : options.loadDeferredImagesMaxIdleTime));
 			} else {
 				frameTreePromise = frames.getAsync(options);
 			}