Item#_clone: check if the item has a _pathStyle property before copying it.

This commit is contained in:
Jonathan Puckey 2011-05-20 19:35:26 +02:00
parent 777cc95dc3
commit 013fe56ea4

View file

@ -33,8 +33,9 @@ var Item = this.Item = Base.extend({
},
_clone: function(copy) {
// Copy over style
copy.setStyle(this._style);
// If this item has a pathStyle, copy it:
if (this._style)
copy.setStyle(this._style);
// If this item has children, clone and append each of them:
if (this._children) {
for (var i = 0, l = this._children.length; i < l; i++)