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

Stop using nullish coalescing operator and optional chaning #3733

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

LukasHirt
Copy link
Contributor

@LukasHirt LukasHirt commented Jul 6, 2020

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

@LukasHirt LukasHirt requested a review from phil-davis July 6, 2020 09:19
@LukasHirt LukasHirt self-assigned this Jul 6, 2020
@update-docs
Copy link

update-docs bot commented Jul 6, 2020

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.

@LukasHirt
Copy link
Contributor Author

LukasHirt commented Jul 6, 2020

@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.

apps/files/src/components/FileDetails.vue Outdated Show resolved Hide resolved
apps/files/src/components/FileDetails.vue Outdated Show resolved Hide resolved
Copy link
Member

@kulmann kulmann left a 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) {
Copy link
Member

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) {
Copy link
Member

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.
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@LukasHirt LukasHirt merged commit f32f1b9 into master Jul 7, 2020
@LukasHirt LukasHirt deleted the bugfix/translations-sync branch July 7, 2020 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants