Skip to content

Commit

Permalink
fix useless timeout when loadDeferredImages is false
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas-lormeau committed Aug 21, 2023
1 parent 3ddc1b6 commit a8e757a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/content/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,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);
}
Expand Down

0 comments on commit a8e757a

Please sign in to comment.