Skip to content

Commit

Permalink
#244 add check if startRelative is valid (#245)
Browse files Browse the repository at this point in the history
else skip and add warning in console
  • Loading branch information
micmro authored and soulgalore committed Apr 8, 2019
1 parent 8d559a1 commit 2661428
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ts/transformers/har.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ export function transformPage(harData: Har | Log,
})
.map((entry, index) => {
const startRelative = new Date(entry.startedDateTime).getTime() - pageStartTime;
doneTime = Math.max(doneTime, startRelative + entry.time);
if (!isNaN(startRelative)) {
doneTime = Math.max(doneTime, startRelative + entry.time);
} else {
// tslint:disable-next-line:no-console
console.warn(`Entry has no valid 'startedDateTime' time`, entry.request.url, entry);
}
return toWaterFallEntry(entry, index, startRelative, isTLS);
});

Expand Down

0 comments on commit 2661428

Please sign in to comment.