* Check if a component is *defined* for an entity, including defaults and mixins. * Does not check whether the component has been *initialized* for an entity. * * @param {string} el - Entity. * @param {string} name - Component name. * @returns {boolean}
(el, name)
| 795 | * @returns {boolean} |
| 796 | */ |
| 797 | function checkComponentDefined (el, name) { |
| 798 | // Check if element contains the component. |
| 799 | if (el.components[name] && el.components[name].attrValue) { return true; } |
| 800 | |
| 801 | return isComponentMixedIn(name, el.mixinEls); |
| 802 | } |
| 803 | |
| 804 | /** |
| 805 | * Check if any mixins contains a component. |
no test coverage detected