Skip to content

Commit

Permalink
Revert "temporarily add try-catch around Number.toFixed call, phetsim…
Browse files Browse the repository at this point in the history
…s/ph-scale#286"

This reverts commit 136c73b.
  • Loading branch information
pixelzoom committed Jul 8, 2023
1 parent 136c73b commit 3cd4d17
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions js/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,7 @@ const Utils = {
toFixed( value, decimalPlaces ) {
const multiplier = Math.pow( 10, decimalPlaces );
const newValue = Utils.roundSymmetric( value * multiplier ) / multiplier;
let fixedValue;
try {
fixedValue = newValue.toFixed( decimalPlaces ); // eslint-disable-line bad-sim-text
}
catch( error ) {
//TODO https://github.com/phetsims/ph-scale/issues/286 This is temporary, for debugging with CT.
throw new Error( `Number.toFixed failed: message=${error.message}, fractionDigits=${decimalPlaces}` );
}
return fixedValue;
return newValue.toFixed( decimalPlaces ); // eslint-disable-line bad-sim-text
},

/**
Expand Down

0 comments on commit 3cd4d17

Please sign in to comment.