Skip to content

Commit 7ae5657

Browse files
committed
extra null check on output to match rectangle
1 parent 5930a90 commit 7ae5657

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/geom/Circle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Phaser.Circle.prototype = {
140140
*/
141141
clone: function (output) {
142142

143-
if (typeof output === "undefined")
143+
if (typeof output === "undefined" || output === null)
144144
{
145145
output = new Phaser.Circle(this.x, this.y, this.diameter);
146146
}

src/geom/Ellipse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Phaser.Ellipse.prototype = {
106106
*/
107107
clone: function(output) {
108108

109-
if (typeof output === "undefined")
109+
if (typeof output === "undefined" || output === null)
110110
{
111111
output = new Phaser.Ellipse(this.x, this.y, this.width, this.height);
112112
}

src/geom/Point.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Phaser.Point.prototype = {
222222
*/
223223
clone: function (output) {
224224

225-
if (typeof output === "undefined")
225+
if (typeof output === "undefined" || output === null)
226226
{
227227
output = new Phaser.Point(this.x, this.y);
228228
}

0 commit comments

Comments
 (0)