File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments