Explorar o código

fix useless timeout when `loadDeferredImages` is `false`

Gildas %!s(int64=2) %!d(string=hai) anos
pai
achega
ea1eeacdb3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
 			}