Skip to content

Commit

Permalink
#224 throw error if startedDateTime is missing in HAR
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mrowetz committed Mar 21, 2018
1 parent e2d0afc commit 0757c2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ts/transformers/har.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export function transformPage(harData: Har | Log,

const pages = getPages(data);
const currPage = pages[pageIndex];
if (!currPage.startedDateTime) {
throw new TypeError(`Invalid HAR document: "log.pages[${pageIndex}].startedDateTime" is not set`);
}
const pageStartTime = new Date(currPage.startedDateTime).getTime();
const pageTimings = currPage.pageTimings;

Expand Down

0 comments on commit 0757c2d

Please sign in to comment.