Uh oh!
There was an error while loading. Please reload this page.
fs: fix readFile will pass undefined to callback but not null - #3740
fs: fix readFile will pass undefined to callback but not null#3740zbinlin wants to merge 1 commit into
Conversation
cjihrig
commented
Nov 10, 2015
I suppose this doesn't hurt for a little extra consistency. LGTM |
cjihrig
commented
Nov 10, 2015
Care to change the |
zbinlin
commented
Nov 10, 2015
In my node's package promise-adapter, I am not sure a callback whether is node-style or not,so I suppose if the first arguments is null that is node-style callback. Other cases, I think this has little effect. |
evanlucas
commented
Nov 10, 2015
I'm not sure how reliable that will be. I'd be willing to bet that there are cases where the first arg to the callback is undefined. |
evanlucas
commented
Nov 10, 2015
thefourtheye
commented
Nov 10, 2015
LGTM |
1 similar comment
JungMinu
commented
Nov 10, 2015
LGTM |
cjihrig
commented
Nov 11, 2015
This commit ensures that readFile() callsback with a null error consistently on success. PR-URL: #3740 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
cjihrig
commented
Nov 11, 2015
Thanks! Landed in 1594198 |
cjihrig
commented
Nov 11, 2015
@jasnell sorry, which labels should I apply to have this backported? There are too many labels to pick from :-) |
jasnell
commented
Nov 11, 2015
Please use the |
This commit ensures that readFile() callsback with a null error consistently on success. PR-URL: #3740 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
MylesBorins
commented
Nov 17, 2015
removing this from lts-watch as it effects code that was part of a semver-major fix that will not be applied to v4.x @cjihrig please feel free to reapply to tag if I am mistaken |
rvagg
commented
Jan 15, 2016
agreeing with @thealphanerd on this and applying |
In PR-3485, if encoding set, fs.readFile will pass undefined not null to callback.