Skip to content

Commit dd1bace

Browse files
committed
Fix Show Number instance, once and for all
1 parent 1a7a804 commit dd1bace

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Data/Show.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ exports.showIntImpl = function (n) {
88

99
exports.showNumberImpl = function (n) {
1010
var str = n.toString();
11-
return str.indexOf("e") === -1 && str.indexOf(".") === -1 ?
12-
str + ".0" :
13-
str;
11+
return isNaN(str + ".0") ? str : str + ".0";
1412
};
1513

1614
exports.showCharImpl = function (c) {

0 commit comments

Comments
 (0)