Don't discard config

This commit is contained in:
samme 2020-05-11 10:22:13 -07:00
parent 70b8bfe4b0
commit 6f3c0d2bb8

View file

@ -56,7 +56,7 @@ var PhysicsGroup = new Class({
}
else if (Array.isArray(children) && IsPlainObject(children[0]))
{
// children is an array of plain objects
// children is an array of plain objects (i.e., configs)
config = children[0];
var _this = this;
@ -66,6 +66,8 @@ var PhysicsGroup = new Class({
singleConfig.internalCreateCallback = _this.createCallbackHandler;
singleConfig.internalRemoveCallback = _this.removeCallbackHandler;
});
children = null;
}
else
{
@ -140,11 +142,6 @@ var PhysicsGroup = new Class({
setImmovable: GetFastValue(config, 'immovable', false)
};
if (Array.isArray(children))
{
config = null;
}
Group.call(this, scene, children, config);
/**