lighthouse 10.0.1-dev.20230221 → 10.0.1-dev.20230222

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -247,8 +247,11 @@ class NetworkRecorder extends RequestEventEmitter {
247
247
 
248
248
  const initiatorURL = PageDependencyGraph.getNetworkInitiators(record)[0];
249
249
  let candidates = recordsByURL.get(initiatorURL) || [];
250
- // The initiator must come before the initiated request.
251
- candidates = candidates.filter(c => c.responseHeadersEndTime <= record.networkRequestTime);
250
+ // The (valid) initiator must come before the initiated request.
251
+ candidates = candidates.filter(c => {
252
+ return c.responseHeadersEndTime <= record.networkRequestTime &&
253
+ c.finished && !c.failed;
254
+ });
252
255
  if (candidates.length > 1) {
253
256
  // Disambiguate based on prefetch. Prefetch requests have type 'Other' and cannot
254
257
  // initiate requests, so we drop them here.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "10.0.1-dev.20230221",
4
+ "version": "10.0.1-dev.20230222",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {