Skip to content

Commit f286a98

Browse files
Merge pull request #35 from juliandescottes/fix-requesttime-0
Fix requesttime 0
2 parents 542ca40 + 794d6e2 commit f286a98

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ff-test-bidi-har-export",
3-
"version": "0.0.16",
3+
"version": "0.0.17",
44
"description": "Experimental helper to export HAR files from WebDriverBiDi network events",
55
"main": "index.js",
66
"scripts": {

src/har-recorder.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ class HarRecorder {
225225
continue;
226226
}
227227

228+
if (networkEntry.request.timings.requestTime == 0) {
229+
this._log(
230+
`Warning: Ignoring entry with invalid requestTime for url: ${networkEntry.url} (id: ${networkEntry.id})`,
231+
);
232+
continue;
233+
}
234+
228235
const entry = this._toHAREntry(networkEntry);
229236
for (const page of recording.log.pages) {
230237
if (page.startedTime <= entry.startedTime) {

0 commit comments

Comments
 (0)