From bdc63e64fe127a1cdf6d358d6aaf65141b28240b Mon Sep 17 00:00:00 2001 From: samreid Date: Thu, 1 Nov 2018 22:49:40 -0600 Subject: [PATCH] hard-code phetioType in StringProperty, see https://github.com/phetsims/axon/issues/116 --- js/StringProperty.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/StringProperty.js b/js/StringProperty.js index cb740fae..24d57156 100644 --- a/js/StringProperty.js +++ b/js/StringProperty.js @@ -23,13 +23,14 @@ define( function( require ) { */ function StringProperty( value, options ) { - options = _.extend( { - phetioType: PropertyIO( StringIO ) - }, options ); + options = options || {}; assert && assert( !options.valueType, 'valueType is set by StringProperty' ); options.valueType = 'string'; + assert && assert( !options.hasOwnProperty( 'phetioType' ), 'phetioType is set by StringProperty' ); + options.phetioType = PropertyIO( StringIO ); + Property.call( this, value, options ); }