From 19c5b7c22cd14fbe5176cffee384823bd5fced0d Mon Sep 17 00:00:00 2001 From: Fishrock123 Date: Thu, 13 Feb 2014 11:05:19 -0500 Subject: [PATCH] Strict type return (boolean) for `Sprite.exists` getter. --- src/gameobjects/Sprite.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index c0427e0d0..e329aadb4 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -872,8 +872,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "exists", { get: function () { - // hmm, type co-ercing? safe? - return this._cache[6]; + return !!this._cache[6]; },