Skip to content

Commit

Permalink
fix: Attempt to fix null pointer once again
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed Jul 25, 2024
1 parent e2ac4ad commit e056d7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/tosu/src/entities/GamePlayData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e056d7f

Please sign in to comment.