Button.onInputUpHandler wouldn't set an upFrame for a frame ID of zero, made the check more strict.

This commit is contained in:
photonstorm 2014-03-17 23:57:27 +00:00
parent 46d5069110
commit 4a407f12a1
2 changed files with 3 additions and 1 deletions

View file

@ -66,6 +66,8 @@ Bug Fixes
* Fixed Tile callback check in Arcade Physics (fix #562)
* Removed the examples build script from the Gruntfile (fix #592)
* The P2 World wouldn't clear down fully on a State change, now properly clears out contacts, resets the bitmask, etc.
* Button.onInputUpHandler wouldn't set an upFrame for a frame ID of zero, made the check more strict.
Updated:

View file

@ -557,7 +557,7 @@ Phaser.Button.prototype.onInputUpHandler = function (sprite, pointer, isOver) {
}
else
{
if (this._onUpFrameName || this._onUpFrameID)
if (this._onUpFrameName !== null || this._onUpFrameID !== null)
{
this.setState(4);
}