You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constructing a new Date with these header values produces a Date that is considered valid, hence the inner text is incorrectly formatted as a date.
console.log(newDate(["private, max-age=0"]));// Sat Jan 01 2000 00:00:00 GMT+0900 (Japan Standard Time)newDate('private, max-age=0')// Sat Jan 01 2000 00:00:00 GMT+0900 (Japan Standard Time)
I noticed that some header values don't show correctly. For example, when I analyzed https://google.co.uk, the
HeadersCard
shows:I noticed the lambda function for the headers is returning the correct data:
Digging deeper, I saw the Row component has both a title attribute and inner text for data. The HTML looks like this:
The title is correct but the inner text is not.
It appears
isValidDate(new Date(value))
offormatValue
within the Row component is causing the problem:https://github.com/Lissy93/web-check/blob/master/src/components/Form/Row.tsx#L72
Constructing a new Date with these header values produces a Date that is considered valid, hence the inner text is incorrectly formatted as a date.
I created the following code sandbox to demonstrate the failing cases:
https://codesandbox.io/p/sandbox/unruffled-austin-lhypg6?file=%2Findex.test.ts%3A45%2C51
Perhaps something like js-http-date could help resolve the issue?
The text was updated successfully, but these errors were encountered: