From 79613bd59fa5600e36f86f2ffb60c09a2d96c86f Mon Sep 17 00:00:00 2001 From: Marla Schulz Date: Sat, 25 Jun 2022 12:05:08 -0600 Subject: [PATCH] Switch to Number(), see: https://github.com/phetsims/perennial/issues/275 --- js/toFixedPointString.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/toFixedPointString.ts b/js/toFixedPointString.ts index 420df04..96b6b49 100644 --- a/js/toFixedPointString.ts +++ b/js/toFixedPointString.ts @@ -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 ); }