Skip to content

Commit

Permalink
Add fix to work better (i.e. not necessarily fully) with Home Assista…
Browse files Browse the repository at this point in the history
…nt Cast
  • Loading branch information
thomasloven committed Jul 26, 2019
1 parent 0efed83 commit bff8a65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion card-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class {
}

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
this.deprecationWarning();
Expand Down

0 comments on commit bff8a65

Please sign in to comment.