Skip to content

Commit

Permalink
validValues should not be PhET-iO state settable for Properties, #453
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kauzmann <[email protected]>
  • Loading branch information
zepumph committed Jun 17, 2024
1 parent f70c7c5 commit 950e371
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions js/ReadOnlyProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,6 @@ export default class ReadOnlyProperty<T> extends PhetioObject implements TReadOn
assert && assert( this.units === units, 'Property units do not match' );
assert && assert( this.isSettable(), 'Property should be settable' );
this.unguardedSet( this.phetioValueType.fromStateObject( stateObject.value ) );

if ( stateObject.validValues ) {
// @ts-expect-error - TODO Should never be set after construction, see https://github.com/phetsims/axon/issues/453
this[ 'validValues' ] = stateObject.validValues.map( ( validValue: StateType ) => ( this.phetioValueType ).fromStateObject( validValue ) ); // eslint-disable-line @typescript-eslint/dot-notation
}
}

/**
Expand Down

0 comments on commit 950e371

Please sign in to comment.