From dafd64afe25e1f53756ba5295d8c85eddb6c6083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Mon, 12 Jul 2021 13:50:47 +0200 Subject: [PATCH] no message --- dist/plex-meets-homeassistant.js | 20 ++++++++++---------- src/editor.ts | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index e0e33d3..99dbd0f 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19475,13 +19475,13 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { }; this.valueUpdated = () => { console.log('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 (!lodash.isEmpty(this.libraryName.value)) { - const originalConfig = lodash.clone(this.config); - this.config.ip = this.ip.value; - this.config.token = this.token.value; - this.config.port = this.port.value; this.config.libraryName = this.libraryName.value; - this.config.protocol = this.protocol.value; this.config.sort = `${this.sort.value}:${this.sortOrder.value}`; if (lodash.isEmpty(this.maxCount.value)) { this.config.maxCount = ''; @@ -19497,11 +19497,11 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { } }); } - if (!lodash.isEqual(this.config, originalConfig)) { - console.log(this.config); - console.log(originalConfig); - this.fireEvent(this, 'config-changed', { config: this.config }); - } + } + if (!lodash.isEqual(this.config, originalConfig)) { + console.log(this.config); + console.log(originalConfig); + this.fireEvent(this, 'config-changed', { config: this.config }); } }; this.render = async () => { diff --git a/src/editor.ts b/src/editor.ts index 991e6f4..7edfbdf 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -66,14 +66,14 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { valueUpdated = (): void => { console.log('valueUpdated'); + 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 (!_.isEmpty(this.libraryName.value)) { - const originalConfig = _.clone(this.config); - this.config.ip = this.ip.value; - this.config.token = this.token.value; - this.config.port = this.port.value; this.config.libraryName = this.libraryName.value; - this.config.protocol = this.protocol.value; this.config.sort = `${this.sort.value}:${this.sortOrder.value}`; if (_.isEmpty(this.maxCount.value)) { this.config.maxCount = ''; @@ -89,11 +89,11 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { } }); } - if (!_.isEqual(this.config, originalConfig)) { - console.log(this.config); - console.log(originalConfig); - this.fireEvent(this, 'config-changed', { config: this.config }); - } + } + if (!_.isEqual(this.config, originalConfig)) { + console.log(this.config); + console.log(originalConfig); + this.fireEvent(this, 'config-changed', { config: this.config }); } };