From 80210945fdcc780e394c486bdfa696314cd794c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Mon, 12 Jul 2021 23:28:17 +0200 Subject: [PATCH] Fix: maxCount not properly loaded into UI config if it was a number --- dist/plex-meets-homeassistant.js | 3 +++ src/editor.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 348f6af..7b56987 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19978,6 +19978,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!lodash.isNil(config.runAfter)) { this.config.runAfter = config.runAfter; } + if (lodash.isNumber(this.config.maxCount)) { + this.config.maxCount = `${this.config.maxCount}`; + } this.render(); }; this.configChanged = (newConfig) => { diff --git a/src/editor.ts b/src/editor.ts index 38fe154..4c7a653 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -592,6 +592,10 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { this.config.runAfter = config.runAfter; } + if (_.isNumber(this.config.maxCount)) { + this.config.maxCount = `${this.config.maxCount}`; + } + this.render(); };