mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
parent
921a68e4a2
commit
367aa8ea28
1 changed files with 4 additions and 0 deletions
|
@ -319,6 +319,10 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
// parent's children object:
|
||||
if (this._name)
|
||||
this._removeNamed();
|
||||
// See if the name is a simple number, which we cannot support due to
|
||||
// the named lookup on the children array.
|
||||
if (name === (+name) + '')
|
||||
throw 'Names consisting only of numbers are not supported.'
|
||||
if (name && this._parent) {
|
||||
var children = this._parent._children,
|
||||
namedChildren = this._parent._namedChildren,
|
||||
|
|
Loading…
Reference in a new issue