diff --git a/src/extras/getChildByName.js b/src/extras/getChildByName.js index 4b2f964..7d2da95 100644 --- a/src/extras/getChildByName.js +++ b/src/extras/getChildByName.js @@ -9,16 +9,16 @@ DisplayObject.prototype.name = null; /** -* Get +* Returns the display object in the container * -* @param name {string} the instance name +* @param name {string} instance name * @return {DisplayObject} */ -Container.prototype.getChildByName = function (val) +Container.prototype.getChildByName = function (name) { for (i = 0; i < this.children.length; i++) { - if (this.children[i].name === val) + if (this.children[i].name === name) { return this.children[i]; }