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.
What steps will reproduce the bug?
In node:12.19.0-slim docker image
setTimeout
function returns a value for whichisNaN=false
In node:12.18.4-slim docker image
setTimeout
function returns a value for whichisNaN=true
timeoutId = setTimeout(function() {alert("Timeout")}, 1000);
console.log(isNaN(timeoutId))
Is this an intentional behaviour?
The text was updated successfully, but these errors were encountered: