frontend/js/common/config/is_component_loaded.js
Paulus Schoutsen 912969111f
Move all of hassUtil to JS (#1153)
* Move all of hassUtil to JS

* Fix tests
2018-05-09 21:33:31 -04:00

5 lines
175 B
JavaScript

/** Return if a component is loaded. */
export default function isComponentLoaded(hass, component) {
return hass && hass.config.core.components.indexOf(component) !== -1;
}