| Index: frog/leg/lib/js_helper.dart
|
| diff --git a/frog/leg/lib/js_helper.dart b/frog/leg/lib/js_helper.dart
|
| index 20c3e97e13d72a9d0ea6608684d3fce3434982bb..d6b861cfe94b501b550f7d687c5e3e2c4cf69673 100644
|
| --- a/frog/leg/lib/js_helper.dart
|
| +++ b/frog/leg/lib/js_helper.dart
|
| @@ -958,7 +958,9 @@ builtin$toStringAsFixed$1(receiver, fractionDigits) {
|
| }
|
| checkNum(fractionDigits);
|
|
|
| - return JS('String', @'$0.toFixed($1)', receiver, fractionDigits);
|
| + String result = JS('String', @'$0.toFixed($1)', receiver, fractionDigits);
|
| + if (receiver == 0 && receiver.isNegative()) return "-$result";
|
| + return result;
|
| }
|
|
|
| builtin$toStringAsExponential$1(receiver, fractionDigits) {
|
| @@ -968,7 +970,10 @@ builtin$toStringAsExponential$1(receiver, fractionDigits) {
|
| }
|
| checkNum(fractionDigits);
|
|
|
| - return JS('String', @'$0.toExponential($1)', receiver, fractionDigits);
|
| + String result = JS('String', @'$0.toExponential($1)',
|
| + receiver, fractionDigits);
|
| + if (receiver == 0 && receiver.isNegative()) return "-$result";
|
| + return result;
|
| }
|
|
|
| builtin$toStringAsPrecision$1(receiver, fractionDigits) {
|
| @@ -978,7 +983,10 @@ builtin$toStringAsPrecision$1(receiver, fractionDigits) {
|
| }
|
| checkNum(fractionDigits);
|
|
|
| - return JS('String', @'$0.toPrecision($1)', receiver, fractionDigits);
|
| + String result = JS('String', @'$0.toPrecision($1)',
|
| + receiver, fractionDigits);
|
| + if (receiver == 0 && receiver.isNegative()) return "-$result";
|
| + return result;
|
| }
|
|
|
| builtin$toRadixString$1(receiver, radix) {
|
|
|