mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
No need to set _index to null since Base.splice() handles that for us.
This commit is contained in:
parent
9c97e44207
commit
0dc2241a9c
2 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ var Document = this.Document = Base.extend({
|
||||||
|
|
||||||
remove: function() {
|
remove: function() {
|
||||||
var res = Base.splice(this._scope.documents, null, this._index, 1);
|
var res = Base.splice(this._scope.documents, null, this._index, 1);
|
||||||
this._scope = this._index = null;
|
this._scope = null;
|
||||||
return !!res.length;
|
return !!res.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ var Item = this.Item = Base.extend({
|
||||||
if (this._name)
|
if (this._name)
|
||||||
this._removeFromNamed();
|
this._removeFromNamed();
|
||||||
var res = Base.splice(this._parent._children, null, this._index, 1);
|
var res = Base.splice(this._parent._children, null, this._index, 1);
|
||||||
this._parent = this._index = null;
|
this._parent = null;
|
||||||
return !!res.length;
|
return !!res.length;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue