Skip to content

Commit

Permalink
Catch when HAR ebtry is missing mime type.
Browse files Browse the repository at this point in the history
Using Firefox with Browsertime I've seen a case at Wikipedia where
a entry is missing mime type and that breaks PerfCascade.
  • Loading branch information
soulgalore committed Aug 25, 2021
1 parent e7d3046 commit fe67079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/transformers/har-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function makeTabs(entry: Entry, requestID: number, requestType: RequestTy
if (requestType === "image") {
tabs.push(makeImgTab(entry));
}
if (entry.response.content && entry.response.content.mimeType.indexOf("text/") === 0 && entry.response.content.text) {
if (entry.response.content && entry.response.content.mimeType && entry.response.content.mimeType.indexOf("text/") === 0 && entry.response.content.text) {
tabs.push(makeContentTab(entry));
}
return tabs.filter((t) => t !== undefined);
Expand Down

0 comments on commit fe67079

Please sign in to comment.