diff --git a/src/item/Item.js b/src/item/Item.js index e6edddbb..147e9b3f 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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,