Skip to content

Commit

Permalink
skip first load based on passIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Feb 6, 2018
1 parent d312f1e commit 17fd268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lighthouse-core/gather/gather-runner.js
Expand Up @@ -211,7 +211,7 @@ class GatherRunner {
const blankPage = options.config.blankPage;

// On the very first pass we're already on blank
const skipLoadBlank = options.config.passName === 'defaultPass';
const skipLoadBlank = options.passIndex === 0;
let pass = skipLoadBlank
? Promise.resolve()
: GatherRunner.loadBlank(options.driver, blankPage);
Expand Down Expand Up @@ -427,7 +427,7 @@ class GatherRunner {
// If the main document redirects, we'll update this to keep track
let urlAfterRedirects;
return passes.reduce((chain, config, passIndex) => {
const runOptions = Object.assign({}, options, {config});
const runOptions = Object.assign({}, options, {config}, {passIndex});
return chain
.then(_ => driver.setThrottling(options.flags, config))
.then(_ => GatherRunner.beforePass(runOptions, gathererResults))
Expand Down

0 comments on commit 17fd268

Please sign in to comment.