Skip to content

Commit

Permalink
Better catch for failing date (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Oct 11, 2024
1 parent 1946d65 commit aa07189
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/entryFromResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ export default function (entry, response, page, options) {
// (see https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/network/ResourceLoadTiming.h?q=requestTime+package:%5Echromium$&dr=CSs&l=84)
const entrySecs =
page.__wallTime + (timing.requestTime - page.__timestamp);
entry.startedDateTime = new Date(entrySecs * 1000).toISOString();
try {
// See https://github.com/sitespeedio/sitespeed.io/issues/4285
entry.startedDateTime = new Date(entrySecs * 1000).toISOString();
// eslint-disable-next-line no-empty
} catch {}

const queuedMillis =
(timing.requestTime - entry.__requestWillBeSentTime) * 1000;
Expand Down

0 comments on commit aa07189

Please sign in to comment.