mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Use local parent short-cut variable.
This commit is contained in:
parent
4d4a39c752
commit
3ac9a4f369
1 changed files with 4 additions and 3 deletions
|
@ -368,9 +368,10 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
if (name === (+name) + '')
|
||||
throw new Error(
|
||||
'Names consisting only of numbers are not supported.');
|
||||
if (name && this._parent) {
|
||||
var children = this._parent._children,
|
||||
namedChildren = this._parent._namedChildren,
|
||||
var parent = this._parent;
|
||||
if (name && parent) {
|
||||
var children = parent._children,
|
||||
namedChildren = parent._namedChildren,
|
||||
orig = name,
|
||||
i = 1;
|
||||
// If unique is true, make sure we're not overriding other names
|
||||
|
|
Loading…
Reference in a new issue