diff --git a/src/item/Group.js b/src/item/Group.js index bc463c98..25a0efba 100644 --- a/src/item/Group.js +++ b/src/item/Group.js @@ -69,6 +69,7 @@ var Group = this.Group = Item.extend({ */ initialize: function(items) { this.base(); + // Allow Group to have children and named children this._children = []; this._namedChildren = {}; this.setChildren(!items || !Array.isArray(items) diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index e54e9ad9..a8b91f23 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -42,7 +42,9 @@ var CompoundPath = this.CompoundPath = PathItem.extend({ */ initialize: function(paths) { this.base(); + // Allow CompoundPath to have children and named children. this._children = []; + this._namedChildren = {}; // Do not reassign to paths, since arguments would get modified, which // we potentially use as array, depending on what is passed. var items = !paths || !Array.isArray(paths)