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

Commit 0d38813

Browse files
committed
Check nipple before destroy it
1 parent 2363851 commit 0d38813

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

core/client/scenes/scene-world.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@ WorldScene = new Phaser.Class({
137137
pinchPlugin.on(
138138
'pinchstart',
139139
function () {
140-
const nipple = this.nippleManager.get(this.nippleManager.ids[0])
141-
nipple.destroy()
140+
if (this.nippleManager) {
141+
const nipple = this.nippleManager.get(this.nippleManager.ids[0])
142+
if (nipple) {
143+
nipple.destroy()
144+
}
145+
}
142146
},
143147
this
144148
)

0 commit comments

Comments
 (0)