-
Notifications
You must be signed in to change notification settings - Fork 156
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
Stop using nullish coalescing operator and optional chaning #3733
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
@phil-davis This PR only fixes errors happening when extracting translations. Not sure if it will also fix the error with push since I cannot run that locally. |
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.
Added an alternative approach in the comments. Feel free to go with yours or mine, both fine 👍
@@ -85,7 +85,11 @@ export default { | |||
}, | |||
|
|||
currentTab() { | |||
return this.currentSidebarTab?.tab || this.defaultTab | |||
if (this.currentSidebarTab) { |
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.
What about if(this.currentSidebarTab && this.currentSidebarTab.tab) {
here? Feels a bit weird to have to fallbacks to the same variable in place. ;-)
|
||
return panel || PANEL_SHOW | ||
if (tabOptions) { |
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.
Same here, you could go with if (tabOptions && tabOptions.collaboratorsCurrentPanel) {
to avoid falling back to the same value in two different places.
Using Nullish coalescing operator and optional chaining resulted in syntax errors in translations sync.
98c8761
to
773dbf1
Compare
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.
👍🏻
Description
Using Nullish coalescing operator and optional changing resulted in syntax errors in translations sync.
Related Issue
Motivation and Context
Passing translations sync
How Has This Been Tested?
Run
make l10n-read