From 950e37137c9117cbe6b0fb154ce00403b1780151 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Mon, 17 Jun 2024 10:20:05 -0600 Subject: [PATCH] validValues should not be PhET-iO state settable for Properties, https://github.com/phetsims/axon/issues/453 Signed-off-by: Michael Kauzmann --- js/ReadOnlyProperty.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/js/ReadOnlyProperty.ts b/js/ReadOnlyProperty.ts index 1ac40ec9..7421a5b5 100644 --- a/js/ReadOnlyProperty.ts +++ b/js/ReadOnlyProperty.ts @@ -577,11 +577,6 @@ export default class ReadOnlyProperty 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 - } } /**