mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 02:08:40 +00:00
extra null check on output to match rectangle
This commit is contained in:
parent
5930a90546
commit
7ae5657113
3 changed files with 3 additions and 3 deletions
|
@ -140,7 +140,7 @@ Phaser.Circle.prototype = {
|
|||
*/
|
||||
clone: function (output) {
|
||||
|
||||
if (typeof output === "undefined")
|
||||
if (typeof output === "undefined" || output === null)
|
||||
{
|
||||
output = new Phaser.Circle(this.x, this.y, this.diameter);
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ Phaser.Ellipse.prototype = {
|
|||
*/
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ Phaser.Point.prototype = {
|
|||
*/
|
||||
clone: function (output) {
|
||||
|
||||
if (typeof output === "undefined")
|
||||
if (typeof output === "undefined" || output === null)
|
||||
{
|
||||
output = new Phaser.Point(this.x, this.y);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue