Skip to content

Commit

Permalink
Fix: Critical bug where setting up card was not possible via UI
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajNyiri committed Jul 12, 2021
1 parent 75d6cbc commit 38587e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions dist/plex-meets-homeassistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -19489,12 +19489,12 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
return event;
};
this.valueUpdated = () => {
const originalConfig = lodash.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (this.loaded) {
const originalConfig = lodash.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (!this.config.entity) {
this.config.entity = [];
}
Expand Down Expand Up @@ -19551,9 +19551,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
this.config.runBefore = this.runBefore.value;
this.config.runAfter = this.runAfter.value;
}
if (!lodash.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
}
if (!lodash.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
};
this.render = async () => {
Expand Down
16 changes: 8 additions & 8 deletions src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
};

valueUpdated = (): void => {
const originalConfig = _.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (this.loaded) {
const originalConfig = _.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (!this.config.entity) {
this.config.entity = [];
}
Expand Down Expand Up @@ -141,9 +141,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
this.config.runBefore = this.runBefore.value;
this.config.runAfter = this.runAfter.value;
}
if (!_.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
}
if (!_.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
};

Expand Down

0 comments on commit 38587e9

Please sign in to comment.