Nullify path parent when removed.

This commit is contained in:
Jonathan Puckey 2011-02-12 19:45:11 +01:00
parent 783244b393
commit e2c77a866d

View file

@ -5,7 +5,6 @@ Item = Base.extend({
this.parent.children.push(this); this.parent.children.push(this);
}, },
/** /**
* When passed a document, copies the item to the document, * When passed a document, copies the item to the document,
* or duplicates it within the same document. When passed an item, * or duplicates it within the same document. When passed an item,
@ -185,6 +184,7 @@ Item = Base.extend({
removeFromParent: function() { removeFromParent: function() {
if(this.parent) if(this.parent)
this.parent.children.splice(this.index, 1); this.parent.children.splice(this.index, 1);
this.parent = null;
}, },
/** /**