Skip to content

Commit

Permalink
add no-multi-assign-on-declaration lint rule, phetsims/chipper#794
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 7, 2019
1 parent 50fa4bb commit 5128745
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/ColorProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ define( require => {
'Unlikely, but would have hilarious consequences since we would overwrite profileNameProperty' );

// Use the requested initial profile, fallback to default.
const initialColor = colorMap[ initialProfileName] || colorMap[ ColorProfile.DEFAULT_COLOR_PROFILE_NAME ];
const initialColor = colorMap[ initialProfileName ] || colorMap[ ColorProfile.DEFAULT_COLOR_PROFILE_NAME ];

// Create a Property for the color
const colorProperty = self[ key + 'Property' ] = new Property( initialColor );
const colorProperty = new Property( initialColor );
self[ key + 'Property' ] = colorProperty;

// Update the Property on profile name changes
self.profileNameProperty.lazyLink( function( profileName ) {
Expand Down

0 comments on commit 5128745

Please sign in to comment.