diff --git a/src/component.js b/src/component.js index f78e642..2667c8a 100644 --- a/src/component.js +++ b/src/component.js @@ -15,10 +15,6 @@ class Component extends StyleAndScriptStoringComponent { * @type {boolean} */ _isCompel; - /** - * @type {WebTrinity} - */ - _wenity; /** * @type {Array} */ @@ -425,7 +421,7 @@ class Component extends StyleAndScriptStoringComponent { .join(this._modifier); } - this._wenity = new WebTrinity(); + let _wenity = new WebTrinity(); if (!styleStore) { styleStore = this._stylesExtStore; @@ -543,18 +539,17 @@ class Component extends StyleAndScriptStoringComponent { executeOnExtStoreTypeCollectedTriple((est) => dealCollected(funcCollections, est)); } else { - this._wenity.js = funcCollections; - this._wenity.css = styleCollection; + _wenity.js = funcCollections; + _wenity.css = styleCollection; } - this._wenity.html = this._element; + _wenity.html = this._element; - for (let i = 0; i < this._toRegister.length; i++) { - const group = this._toRegister[i]; + for (const group of this._toRegister) { Page.subscribeComponentToGroup(group, this._compName) } - return this._wenity; + return _wenity; }