From a05915672b3656f62067dced0c0236ca41482994 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:20:35 +0100 Subject: [PATCH] fuck JS --- src/components/ScoreStats.js | 2 +- src/consts/LeaderboardType.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ScoreStats.js b/src/components/ScoreStats.js index 63430da..fdc10a9 100644 --- a/src/components/ScoreStats.js +++ b/src/components/ScoreStats.js @@ -20,7 +20,7 @@ export default class ScoreStats extends Component { render() { const data = this.props.data; - const currentPP = Utils.calculatePP( + let currentPP = Utils.calculatePP( data.mapStarCount, data.percentage.replace("%", ""), data.websiteType diff --git a/src/consts/LeaderboardType.js b/src/consts/LeaderboardType.js index ca1dacd..6437607 100644 --- a/src/consts/LeaderboardType.js +++ b/src/consts/LeaderboardType.js @@ -40,7 +40,7 @@ const WebsiteTypes = { return undefined; } const pp = this.curve(acc / 100, stars - 0.5) * (stars + 0.5) * 42; - return pp == NaN ? undefined : pp; + return Number.isNaN(pp) ? undefined : pp; }, }, Test: {