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
In node:12.19.0-slim docker image setTimeout function returns a value for which isNaN=false
In node:12.18.4-slim docker image setTimeout function returns a value for which isNaN=true
I don't have much to add - the change is definitely something that should have happened at some point. The current maintainers will need figure out what, if anything, to do about this situation.
@kefasb just to point out - this change should have probably been communicated better and semver-major if people "in the wild" are running into cases where code that checks for node vs. browser timers is starting to fail.
The idea was to make node timers easier to work with and this sort of usage pattern (someone using isNaN to check if the timer they got was a web browser) was missed on our part.
Activity
Trott commentedon Oct 23, 2020
It was indeed an intentional change. #34017
I wonder if perhaps that would have ideally been treated as semver-major, but I can see why that wasn't obvious at the time.
@lundibundi @nodejs/timers
Fishrock123 commentedon Oct 25, 2020
I don't have much to add - the change is definitely something that should have happened at some point. The current maintainers will need figure out what, if anything, to do about this situation.
kefasb commentedon Oct 26, 2020
Thank you for clarification.
benjamingr commentedon Oct 26, 2020
@kefasb just to point out - this change should have probably been communicated better and semver-major if people "in the wild" are running into cases where code that checks for node vs. browser timers is starting to fail.
The idea was to make node timers easier to work with and this sort of usage pattern (someone using isNaN to check if the timer they got was a web browser) was missed on our part.
Sorry for breaking your code!