-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib: fix undefined timeout regression #3331
Conversation
@@ -30,7 +30,7 @@ var lists = {}; | |||
// with them. | |||
exports.active = function(item) { | |||
const msecs = item._idleTimeout; | |||
if (msecs < 0) return; | |||
if (msecs < 0 || util.isUndefined(msecs)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of util.isUndefined
, should be probably just be msecs === undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing, incoming..
LGTM, cc @jasnell |
yea, LGTM other than that |
d66d408
to
e2c2b44
Compare
Fixed the |
LGTM |
63644dd introduced a regression caused by everyone's favourite JavaScript feature: undefined < 0 === undefined >= 0. Add a case to the existing tests to cover this scenario and then add the check for undefined that makes the test pass. PR-URL: #3331 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed By: Evan Lucas <evanlucas@me.com>
are we doing trailing commas? |
Landed in bde32f8. Forgot to run CI :( Thank you! |
Argh, I have overlooked it. No, we don't |
sorry! should I bother fixing? |
63644dd introduced a regression caused by everyone's favourite JavaScript feature: undefined < 0 === undefined >= 0. Add a case to the existing tests to cover this scenario and then add the check for undefined that makes the test pass.
e2c2b44
to
1e14233
Compare
guess I probably shouldn't have force pushed the fix for the trailing comma.. oh well. |
I'm impressed/terrified that this edge case surfaced so quickly. Thanks for finding/fixing. |
63644dd introduced a regression caused by everyone's favourite JavaScript feature: undefined < 0 === undefined >= 0. Add a case to the existing tests to cover this scenario and then add the check for undefined that makes the test pass. PR-URL: #3331 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed By: Evan Lucas <evanlucas@me.com>
Landed in v4.x in c245a19 |
Oops. |
Thanks for this - really appreciate the quick turn around for those of us relying on this fix and using LTS! |
@Trott I'm really aggressive with rolling new released out to StrongLoop's CI, and we have over 100 modules running through it.. didn't take long before we started getting some really mysterious build failures. |
63644dd introduced a regression caused by everyone's favourite
JavaScript feature:
undefined < 0 === undefined >= 0
.Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.
@indutny @jasnell this should fix at least one of the v4.2.0 regressions.