Skip to content

Commit aaf5403

Browse files
authored
Fix mm leaderboard (topcoder-platform#87)
Fix mm leaderboard
2 parents 1897d4e + e9579aa commit aaf5403

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
3232
"test": "npm run lint && npm run jest"
3333
},
34-
"version": "0.7.11-8",
34+
"version": "0.7.11-14",
3535
"dependencies": {
3636
"auth0-js": "^6.8.4",
3737
"config": "^3.2.0",

src/utils/submission.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function removeDecimal(num) {
1313
}
1414

1515
function toAcurateFixed(num, decimal) {
16-
const re = new RegExp(`^-?\\d+(?:.\\d{0,${(decimal - 1)}})?`);
16+
const re = new RegExp(`^-?\\d+(?:.\\d{0,${(decimal)}})?`);
1717
return num.toString().match(re)[0];
1818
}
1919

@@ -24,7 +24,7 @@ function toFixed(num, decimal) {
2424
const result = _.toFinite(toAcurateFixed(num, decimal));
2525
const integerResult = _.toFinite(removeDecimal(num));
2626

27-
if (_.isInteger(integerResult)) {
27+
if (_.isInteger(result)) {
2828
return integerResult;
2929
}
3030
return result;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy