Uh oh!
There was an error while loading. Please reload this page.
util: add null prototype support for date - #25144
Conversation
BridgeAR
left a comment
There was a problem hiding this comment.
Since invalid dates will now be handled properly with keys as well, please also add a test for that (as well as subclassing if implemented).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
43c8edf to
435415fCompareantsmartian
commented
Dec 21, 2018
2a9c063 to
5f8d3a9Compare
BridgeAR
left a comment
There was a problem hiding this comment.
This is LG to me if the keys.length === 0 check is removed (the original conditional was a mistake in the first place and with the current implementation it produces a weird output).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
840315d to
58b2abaCompareThanks for guiding me here @BridgeAR. I love utils, may be few more PR's on the way! I guess we are now left with RE and Errors null proto handling. Will try out working on RE and send out a PR in a few days. |
antsmartian
commented
Dec 21, 2018
jdalton
commented
Dec 21, 2018
I've had this bite me for other non-date values. Might be a good time to review other places this can happen. |
antsmartian
commented
Dec 22, 2018
@jdalton Yes. We have already support for other types apart from Error and RE. |
Resume CI: https://ci.nodejs.org/job/node-test-pull-request/19748/ ✔️ |
BridgeAR
commented
Dec 27, 2018
@nodejs/util this could use another LG. @antsmartian this needs a rebase. |
antsmartian
commented
Jan 7, 2019
New CI After Rebase: https://ci.nodejs.org/job/node-test-pull-request/19966/ |
antsmartian
commented
Jan 8, 2019
antsmartian
commented
Jan 9, 2019
Fresh CI (after rebase due to conflict): https://ci.nodejs.org/job/node-test-pull-request/20009/ |
antsmartian
commented
Jan 9, 2019
Uh oh!
There was an error while loading. Please reload this page.
antsmartian
commented
Jan 9, 2019
BridgeAR
commented
Jan 10, 2019
Landed in 81b25ea 🎉 |
PR-URL: nodejs#25144 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #25144 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25144 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds the support of null prototype in Date object.
cc @BridgeAR
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes