Просмотр исходного кода

fix useless timeout when `loadDeferredImages` is `false`

Gildas 2 лет назад
Родитель
Сommit
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);
 			}