Skip to content

Commit

Permalink
Switch to Number(), see: phetsims/perennial#275
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Jun 25, 2022
1 parent aff4b86 commit 79613bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/toFixedPointString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function toFixedPointString( value: number, decimalPlaces: number ): string {
}

// Remove negative sign from -0 values.
if ( parseFloat( stringValue ) === 0 && stringValue[ 0 ] === '-' ) {
if ( Number( stringValue ) === 0 && stringValue[ 0 ] === '-' ) {
stringValue = stringValue.substring( 1, stringValue.length );
}

Expand Down

0 comments on commit 79613bd

Please sign in to comment.