Add fix to work better (i.e. not necessarily fully) with Home Assistant Cast

This commit is contained in:
Thomas Lovén 2019-07-26 17:51:13 +02:00
parent 0efed83c3f
commit bff8a650bc

View File

@ -19,7 +19,9 @@ class {
} }
static get LitElement() { static get LitElement() {
return Object.getPrototypeOf(customElements.get('home-assistant-main')); if(customElements.get('home-assistant-main'))
return Object.getPrototypeOf(customElements.get('home-assistant-main'));
return Object.getPrototypeOf(customElements.get('hui-view'));
} }
static litElement() { // Backwards compatibility - deprecated static litElement() { // Backwards compatibility - deprecated
this.deprecationWarning(); this.deprecationWarning();