extra null check on output to match rectangle

This commit is contained in:
beeglebug 2014-08-21 22:44:40 +01:00
parent 5930a90546
commit 7ae5657113
3 changed files with 3 additions and 3 deletions

View file

@ -140,7 +140,7 @@ Phaser.Circle.prototype = {
*/ */
clone: function (output) { clone: function (output) {
if (typeof output === "undefined") if (typeof output === "undefined" || output === null)
{ {
output = new Phaser.Circle(this.x, this.y, this.diameter); output = new Phaser.Circle(this.x, this.y, this.diameter);
} }

View file

@ -106,7 +106,7 @@ Phaser.Ellipse.prototype = {
*/ */
clone: function(output) { clone: function(output) {
if (typeof output === "undefined") if (typeof output === "undefined" || output === null)
{ {
output = new Phaser.Ellipse(this.x, this.y, this.width, this.height); output = new Phaser.Ellipse(this.x, this.y, this.width, this.height);
} }

View file

@ -222,7 +222,7 @@ Phaser.Point.prototype = {
*/ */
clone: function (output) { clone: function (output) {
if (typeof output === "undefined") if (typeof output === "undefined" || output === null)
{ {
output = new Phaser.Point(this.x, this.y); output = new Phaser.Point(this.x, this.y);
} }