mirror of
https://github.com/wassname/phaser.git
synced 2026-07-15 01:11:26 +08:00
Fixes #382 Error when using InputHandler#onInputUp & sprite destroys itself during the event.
This commit is contained in:
@@ -386,7 +386,7 @@ Phaser.Pointer.prototype = {
|
||||
while (currentNode != null)
|
||||
}
|
||||
|
||||
if (this._highestRenderObject == null)
|
||||
if (this._highestRenderObject === null)
|
||||
{
|
||||
// The pointer isn't currently over anything, check if we've got a lingering previous target
|
||||
if (this.targetObject)
|
||||
@@ -398,7 +398,7 @@ Phaser.Pointer.prototype = {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.targetObject == null)
|
||||
if (this.targetObject === null)
|
||||
{
|
||||
// And now set the new one
|
||||
// console.log('And now set the new one');
|
||||
@@ -409,7 +409,7 @@ Phaser.Pointer.prototype = {
|
||||
{
|
||||
// We've got a target from the last update
|
||||
// console.log("We've got a target from the last update");
|
||||
if (this.targetObject == this._highestRenderObject)
|
||||
if (this.targetObject === this._highestRenderObject)
|
||||
{
|
||||
// Same target as before, so update it
|
||||
// console.log("Same target as before, so update it");
|
||||
|
||||
Reference in New Issue
Block a user