From e056d7fd0e9a6580bb9657811eee7ce506818dd7 Mon Sep 17 00:00:00 2001 From: ck <21735205+cyperdark@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:24:37 +0300 Subject: [PATCH] fix: Attempt to fix `null pointer` once again --- packages/tosu/src/entities/GamePlayData/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/tosu/src/entities/GamePlayData/index.ts b/packages/tosu/src/entities/GamePlayData/index.ts index 982113f9..0551bf1d 100644 --- a/packages/tosu/src/entities/GamePlayData/index.ts +++ b/packages/tosu/src/entities/GamePlayData/index.ts @@ -116,6 +116,7 @@ export class GamePlayData extends AbstractEntity { this.previousPassedObjects = 0; this.GradualPerformance = undefined; + this.PerformanceAttributes = undefined; // below is gata that shouldn't be reseted on retry if (isRetry === true) { return; @@ -632,7 +633,12 @@ export class GamePlayData extends AbstractEntity { this.previousState = currentState; } - if (!this.GradualPerformance && !this.PerformanceAttributes) return; + if (!this.GradualPerformance || !this.PerformanceAttributes) { + wLogger.debug( + `GD(updateStarsAndPerformance) One of things not ready. GP:${this.GradualPerformance === undefined} - PA:${this.PerformanceAttributes === undefined}` + ); + return; + } const passedObjects = calculatePassedObjects( this.Mode,