Only set data if it's not undefined.

This commit is contained in:
Richard Davey 2018-04-09 12:57:03 +01:00
parent bf368ab70b
commit 66a9bec9bb

View file

@ -491,6 +491,7 @@ var Systems = new Class({
/**
* Start this Scene running and rendering.
* Called automatically by the SceneManager.
*
* @method Phaser.Scenes.Systems#start
* @since 3.0.0
@ -499,9 +500,12 @@ var Systems = new Class({
*/
start: function (data)
{
this.settings.status = CONST.START;
if (data)
{
this.settings.data = data;
}
this.settings.data = data;
this.settings.status = CONST.START;
this.settings.active = true;
this.settings.visible = true;