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

fix(FEC-10844): advanced caption settings custom caption is always marked even when choose sample #525

Merged
merged 7 commits into from
Dec 31, 2020

Conversation

Yuvalke
Copy link
Contributor

@Yuvalke Yuvalke commented Dec 30, 2020

Description of the Changes

Issue: the condition of || doesn't work properly with 0 as the current value and always takes the default option.
Solution: create the default values as a static getter to be able to use it on static methods and on the first initialize of the properties.
merge the setting and default value to make sure all set correctly.
add relevant tests.

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

…rked even when choose sample

Issue: condition of || doesn't work properly with 0 as current value and always take the second option.
Solution: create the defaultValues as static getter to be able to use it on static methods and on first initilize of the properties.
merge the setting and default value to make sure all set correctly.
add relevant tests.
@Yuvalke Yuvalke requested a review from a team December 30, 2020 15:49
@Yuvalke Yuvalke self-assigned this Dec 30, 2020
src/track/text-style.js Outdated Show resolved Hide resolved
src/track/text-style.js Outdated Show resolved Hide resolved
src/track/text-style.js Outdated Show resolved Hide resolved
@Yuvalke Yuvalke requested a review from OrenMe December 30, 2020 17:36
Comment on lines 143 to 147
let value = defaultValue;
if (typeof newValue !== 'undefined' && newValue !== null) {
value = newValue;
}
return value;
Copy link
Contributor

Choose a reason for hiding this comment

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

 can be replace with a one liner:
 return (typeof newValue !== 'undefined' && newValue !== null) ? newValue : defaultValue
 
 But its a matter of taste...

Copy link
Contributor

Choose a reason for hiding this comment

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

So unless you wanna change this to my suggestion then it is approved

@Yuvalke Yuvalke merged commit 2b9bbc7 into master Dec 31, 2020
@Yuvalke Yuvalke deleted the FEC-10844 branch December 31, 2020 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants