From 923318af86e4c529e73b99cf646d28942552a841 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Thu, 20 Oct 2022 18:20:21 +0100 Subject: [PATCH] Fix flashy pp --- src/components/ScoreStats.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ScoreStats.js b/src/components/ScoreStats.js index 63430da..e025688 100644 --- a/src/components/ScoreStats.js +++ b/src/components/ScoreStats.js @@ -6,6 +6,7 @@ import Utils from "../utils/utils"; export default class ScoreStats extends Component { constructor(params) { super(params); + this.lastKnownPP = undefined; } /** @@ -20,11 +21,14 @@ 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 ); + if (this.lastKnownPP === undefined || this.lastKnownPP < currentPP) { + currentPP = this.lastKnownPP; + } return (