Skip to content

Commit

Permalink
Fixed isValidRange() check, see phetsims/dot#77
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisklus committed Oct 2, 2018
1 parent f57d748 commit 680a8d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/NumberProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ define( function( require ) {
* @returns {boolean}
*/
function isValidRange( range ) {
return ( typeof range === 'object' ) && range.hasOwnProperty( 'min' ) && range.hasOwnProperty( 'max' );
return ( typeof range === 'object' ) && typeof range.min === 'number' && typeof range.max === 'number';
}

return inherit( Property, NumberProperty, {
Expand Down

0 comments on commit 680a8d6

Please sign in to comment.