-
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
Fixed typo. Removed useless "?". #42518
Conversation
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.
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.
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"? |
AFAICT this is a user-facing function, so maybe the tests are lacking? |
It's not a user-facing function, there's no |
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>
No description provided.