Skip to content

Commit

Permalink
short-circuit valuePattern validation when stringTest query parameter…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 27, 2019
1 parent 373008a commit 4654f48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/NumberSpinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ define( function( require ) {
// validate options
assert && assert( _.includes( ARROWS_POSITION_VALUES, options.arrowsPosition ), 'invalid arrowsPosition: ' + options.arrowsPosition );
assert && assert( _.includes( VALUE_ALIGN_VALUES, options.valueAlign ), 'invalid valueAlign: ' + options.valueAlign );
assert && assert( options.valuePattern.indexOf( SunConstants.VALUE_NAMED_PLACEHOLDER ) !== -1,
assert && assert( !!phet.chipper.queryParameters.stringTest ||
options.valuePattern.indexOf( SunConstants.VALUE_NAMED_PLACEHOLDER ) !== -1,
'missing value placeholder in options.valuePattern: ' + options.valuePattern );

Tandem.indicateUninstrumentedCode();
Expand Down

0 comments on commit 4654f48

Please sign in to comment.