Skip to content

Commit

Permalink
Fix the crash when removing a non-existing object when clearing side …
Browse files Browse the repository at this point in the history
…effects
  • Loading branch information
solstice23 committed Nov 5, 2024
1 parent 8ed3383 commit 6380a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/Main/Playfield/ObjectsCanvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class PixiManager {
for (const fruit of this.fruits) {
fruit.destory();
}
this.parent.removeChild(this.app.canvas);
if (this?.app?.canvas) this.parent.removeChild(this.app.canvas);
this.app.destroy();
}
}
Expand Down

0 comments on commit 6380a8f

Please sign in to comment.