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

Unnecessary use of merge #48

Closed
pixelzoom opened this issue Jun 28, 2022 · 1 comment
Closed

Unnecessary use of merge #48

pixelzoom opened this issue Jun 28, 2022 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 28, 2022

For code review #41 ...

There's an occurrence of merge in MeanShareAndBalanceScreenView.ts:

    this.questionBar = new QuestionBar( this.layoutBounds, this.visibleBoundsProperty, merge( {
      tandem: options.tandem.createTandem( 'questionBar' )
    }, { labelText: meanShareAndBalanceStrings.levelingOutQuestion, barFill: '#2496D6' } ) );

I was going to suggest converting to optionize. But both of the arguments are object literals, so can't they be combined, like this?

    this.questionBar = new QuestionBar( this.layoutBounds, this.visibleBoundsProperty, {
      labelText: meanShareAndBalanceStrings.levelingOutQuestion,
      barFill: '#2496D6',
      tandem: options.tandem.createTandem( 'questionBar' )
    } );
@marlitas
Copy link
Contributor

Merge removed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants