Fix no children created from GroupCreateConfig[] (multiple adds)

Fixes #3612
This commit is contained in:
samme 2018-04-23 18:14:36 -07:00
parent 8bdeb69716
commit 66f1ff848e

View file

@ -239,7 +239,7 @@ var Group = new Class({
*/
this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null);
if (config && config.key !== undefined)
if (config)
{
this.createMultiple(config);
}
@ -299,8 +299,7 @@ var Group = new Class({
*
* If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created.
*
* Calls {@link Phaser.GameObjects.Group#createMultipleCallback}
* and {@link Phaser.GameObjects.Group#createCallback}.
* Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}.
*
* @method Phaser.GameObjects.Group#createMultiple
* @since 3.0.0
@ -321,6 +320,11 @@ var Group = new Class({
config = [ config ];
}
if (config[0].key === undefined)
{
return [];
}
var output = [];
for (var i = 0; i < config.length; i++)