Skip to content

Commit

Permalink
fix float class valueToString method
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Jan 16, 2024
1 parent 8872e15 commit 1e85a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion property_tests/arbitraries/canister_arb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TextClass.prototype.valueToString = (x): string => {
*/
FloatClass.prototype.valueToString = (x): string => {
const floatString = x.toString();
if (floatString.includes('.')) {
if (floatString.includes('.') || floatString.includes('e')) {
return floatString;
}
return floatString + '.0';
Expand Down

0 comments on commit 1e85a2a

Please sign in to comment.