Guard against undefined navtimings (#2995)

This commit is contained in:
Peter Hedenskog 2020-05-15 08:49:36 +02:00 committed by GitHub
parent 6894206188
commit 2faf6bbf00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -35,12 +35,14 @@ module.exports = {
});
forEach(browsertimeRunData.timings.navigationTiming, (value, name) => {
statsHelpers.pushGroupStats(
this.statsPerType,
this.groups[group],
['navigationTiming', name],
value
);
if (value) {
statsHelpers.pushGroupStats(
this.statsPerType,
this.groups[group],
['navigationTiming', name],
value
);
}
});
// pick up one level of custom metrics