Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Check nipple before destroy it
Browse files Browse the repository at this point in the history
  • Loading branch information
alimtunc committed Jun 27, 2023
1 parent 2363851 commit 0d38813
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/client/scenes/scene-world.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,12 @@ WorldScene = new Phaser.Class({
pinchPlugin.on(
'pinchstart',
function () {
const nipple = this.nippleManager.get(this.nippleManager.ids[0])
nipple.destroy()
if (this.nippleManager) {
const nipple = this.nippleManager.get(this.nippleManager.ids[0])
if (nipple) {
nipple.destroy()
}
}
},
this
)
Expand Down

0 comments on commit 0d38813

Please sign in to comment.