Workaround for bug in Safari

This commit is contained in:
2020-01-09 00:04:04 +01:00
parent 146a5583db
commit 97967dc1ed
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ class StateSwitch extends LitElement {
}
if(config.entity === 'mediaquery') {
for(const q in this.cards) {
window.matchMedia(q).addEventListener("change", this.update_state.bind(this));
window.matchMedia(q).addListener(this.update_state.bind(this));
}
}
if(config.entity === 'template') {