Skip to content

Commit

Permalink
🩹 Use the right element to get LitElement from (#50)
Browse files Browse the repository at this point in the history
The `home-assistant` element is not a normal LitElement, but has a bunch of mixins giving unwanted side effects
  • Loading branch information
bramkragten authored Apr 30, 2021
1 parent d6c5bd7 commit 040e44d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import style from './style';
import { handleClick } from './handleClick';

const LitElement = window.LitElement
|| Object.getPrototypeOf(customElements.get("home-assistant") || customElements.get("hui-view"))
|| Object.getPrototypeOf(customElements.get("ha-panel-lovelace") || customElements.get("hc-lovelace"))
const { html, css } = LitElement.prototype;

const UNITS = {
Expand Down

0 comments on commit 040e44d

Please sign in to comment.