From: Cameron Chamberlain Date: Thu, 23 Apr 2020 16:07:27 +0000 (+1000) Subject: [misc] Remove stray second arg from `parseFloat` (#5277) X-Git-Tag: 2.25.0~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0428585e91e30d0d29714fc689e423f8ef90a9d2;p=thirdparty%2Fmoment.git [misc] Remove stray second arg from `parseFloat` (#5277) Looks like someone was thinking of parseInt which takes a `radix` param. In parseFloat there should be one argument only. --- diff --git a/src/lib/units/timestamp.js b/src/lib/units/timestamp.js index a49e1e4b8..50c6b87fe 100644 --- a/src/lib/units/timestamp.js +++ b/src/lib/units/timestamp.js @@ -13,7 +13,7 @@ addFormatToken('x', 0, 0, 'valueOf'); addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { - config._d = new Date(parseFloat(input, 10) * 1000); + config._d = new Date(parseFloat(input) * 1000); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input));