-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
Description
When querying since 1970
, it will be parsed into the UNIX timestamp 0
. On the other hand, in caniuse-lite
data, release date of unreleased versions are null
.
Now, when processing since
query, there is a comparison logic:
Line 212 in 29cecf9
return data.releaseDate[v] >= since |
In JavaScript, null >= 0
will be evaluated to true
, which causes unreleased versions will be included in the result when querying since 1970
.
I'm not sure whether it's a bug or not. I found this problem when I was implementing since
query in browserslist-rs, and currently I implemented this feature/bug as-is: https://github.com/g-plane/browserslist-rs/blob/35ed72f516ab1230d0c102169a9bbe25f493fedb/src/queries/since.rs#L53-L62 .
Semigradsky
Metadata
Metadata
Assignees
Labels
No labels