From 30c53335033b3e980d6dd94a41f29ff4575133fd Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Tue, 24 Sep 2019 21:58:59 +0530 Subject: [PATCH 1/2] fix mm leaderbord issue --- __tests__/__snapshots__/index.js.snap | 3 +++ package.json | 2 +- src/utils/submission.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index f2f97d81..79a7d795 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -212,14 +212,17 @@ Object { "countReset": [Function], "debug": [Function], "dir": [Function], + "dirxml": [Function], "error": [Function], "group": [Function], "groupCollapsed": [Function], "groupEnd": [Function], "info": [Function], "log": [Function], + "table": [Function], "time": [Function], "timeEnd": [Function], + "timeLog": [Function], "trace": [Function], "warn": [Function], }, diff --git a/package.json b/package.json index 254998fe..b6458588 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .", "test": "npm run lint && npm run jest" }, - "version": "0.7.11-8", + "version": "0.7.11-14", "dependencies": { "auth0-js": "^6.8.4", "config": "^3.2.0", diff --git a/src/utils/submission.js b/src/utils/submission.js index 8beff39a..970fea14 100644 --- a/src/utils/submission.js +++ b/src/utils/submission.js @@ -13,7 +13,7 @@ function removeDecimal(num) { } function toAcurateFixed(num, decimal) { - const re = new RegExp(`^-?\\d+(?:.\\d{0,${(decimal - 1)}})?`); + const re = new RegExp(`^-?\\d+(?:.\\d{0,${(decimal)}})?`); return num.toString().match(re)[0]; } @@ -24,7 +24,7 @@ function toFixed(num, decimal) { const result = _.toFinite(toAcurateFixed(num, decimal)); const integerResult = _.toFinite(removeDecimal(num)); - if (_.isInteger(integerResult)) { + if (_.isInteger(result)) { return integerResult; } return result; From e9579aa0fb1669a53715f0700e23ddc3de1d81ee Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Tue, 24 Sep 2019 22:03:55 +0530 Subject: [PATCH 2/2] fix test cases --- __tests__/__snapshots__/index.js.snap | 3 --- 1 file changed, 3 deletions(-) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index 79a7d795..f2f97d81 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -212,17 +212,14 @@ Object { "countReset": [Function], "debug": [Function], "dir": [Function], - "dirxml": [Function], "error": [Function], "group": [Function], "groupCollapsed": [Function], "groupEnd": [Function], "info": [Function], "log": [Function], - "table": [Function], "time": [Function], "timeEnd": [Function], - "timeLog": [Function], "trace": [Function], "warn": [Function], }, 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