Skip to content
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

fs: remove unnecessary ?? operator #43073

Conversation

mroderick
Copy link
Contributor

This was introduced in 57678e5

With the if conditional around this statement, options will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.

This was introduced in 57678e5

With the `if` conditional around this statement, `options` will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels May 12, 2022
@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label May 12, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 12, 2022
@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros LiviaMedeiros added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 12, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros LiviaMedeiros added the commit-queue Add this label to land a pull request using GitHub Actions. label May 15, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 15, 2022
@nodejs-github-bot nodejs-github-bot merged commit 4a34ece into nodejs:master May 15, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 4a34ece

@LiviaMedeiros
Copy link
Contributor

Thanks for the contribution! 🎉

BethGriggs pushed a commit that referenced this pull request May 16, 2022
This was introduced in 57678e5

With the `if` conditional around this statement, `options` will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.

PR-URL: #43073
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request May 16, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
This was introduced in 57678e5

With the `if` conditional around this statement, `options` will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.

PR-URL: #43073
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
@danielleadams
Copy link
Member

@mroderick this doesn't land cleanly on v16.x-staging. If this is needed in v16.x, can you open up a backport PR? Thank you

@LiviaMedeiros
Copy link
Contributor

@danielleadams v16.x-staging branch doesn't seem to have 57678e5 (semver-minor) which introduced the bug. Was it planned to be there?

@danielleadams
Copy link
Member

@LiviaMedeiros okay, makes sense. That commit is semver minor, and I'm creating a patch release. I'll skip this commit and it will go in for the next v16.x semver minor release. Thank you

targos pushed a commit that referenced this pull request Jul 18, 2022
This was introduced in 57678e5

With the `if` conditional around this statement, `options` will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.

PR-URL: #43073
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
This was introduced in 57678e5

With the `if` conditional around this statement, `options` will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.

PR-URL: #43073
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
@mroderick mroderick deleted the remove-unncessary-nullish-coalescing-operator branch August 3, 2022 08:24
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
This was introduced in 57678e5

With the `if` conditional around this statement, `options` will always
be evaluated as truthy. That means that the nullish coalescing operator
will always evaluate to the left side, make it unnecessary.

PR-URL: nodejs/node#43073
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.