| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
The ? here is not useless as it is ensuring buffer is not null or undefined before checking the value of .byteLength. It is part of the optional chaining operator.
Sorry, something went wrong.
Looks like tests are passing with this change, so maybe we don't need the optional chaining here? Maybe @alsoamit you meant "unused" rather than "useless"? |
Sorry, something went wrong.
AFAICT this is a user-facing function, so maybe the tests are lacking? |
Sorry, something went wrong.
It's not a user-facing function, there's no fs.promises.write function, it's only used internally AFAIK. EDIT: although there's FileHandle.prototype.write that uses it, without validating its arguments it looks like. We should make sure we have tests for that. |
Sorry, something went wrong.
Refs: nodejs#42518 PR-URL: nodejs#42541 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: nodejs#42518 PR-URL: nodejs#42541 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: nodejs/node#42518 PR-URL: nodejs/node#42541 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
| Back | FazBrowse Home | New Git URL |
No description provided.