Skip to content

Commit

Permalink
core(fr): handle cached timespan records (#13181)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine authored Oct 6, 2021
1 parent 6c3d609 commit bab68ca
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ class UnusedBytes extends Audit {
settings,
};
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
const hasContentfulRecords = networkRecords.some(record => record.transferSize);

// Requesting load simulator requires non-empty network records.
// Timespans are not guaranteed to have any network activity.
// There are no bytes to be saved if no bytes were downloaded, so mark N/A if empty.
if (!networkRecords.length && gatherContext.gatherMode === 'timespan') {
if (!hasContentfulRecords && gatherContext.gatherMode === 'timespan') {
return {
score: 1,
notApplicable: true,
Expand Down

0 comments on commit bab68ca

Please sign in to comment.