Skip to content

Commit 4dfa49f

Browse files
committed
Fix return states
1 parent 0e72b3d commit 4dfa49f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/animations/AnimationState.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,11 +1629,11 @@ var AnimationState = new Class({
16291629
*
16301630
* @param {string} key - The key of the Animation to retrieve.
16311631
*
1632-
* @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid.
1632+
* @return {Phaser.Animations.Animation} The Animation, or `null` if the key is invalid.
16331633
*/
16341634
get: function (key)
16351635
{
1636-
return (this.anims && this.anims.get(key));
1636+
return (this.anims) ? this.anims.get(key) : null;
16371637
},
16381638

16391639
/**
@@ -1644,11 +1644,11 @@ var AnimationState = new Class({
16441644
*
16451645
* @param {string} key - The key of the Animation to check.
16461646
*
1647-
* @return {boolean} `true` if the Animation exists locally, or `false` if the key is available.
1647+
* @return {boolean} `true` if the Animation exists locally, or `false` if the key is available, or there are no local animations.
16481648
*/
16491649
exists: function (key)
16501650
{
1651-
return (this.anims && this.anims.has(key));
1651+
return (this.anims) ? this.anims.has(key) : false;
16521652
},
16531653

16541654
/**

0 commit comments

Comments
 (0)