From dc47f4800407de43034d106abe5234125279be70 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 29 Mar 2022 08:59:10 +0200 Subject: [PATCH] * (Apollon77) Fix crash cases reported by Sentry (IOBROKER-HASS-2) --- README.md | 4 ++++ main.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9be354f..e4c2f3b 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,10 @@ Please check it https://www.smarthomejetzt.de/mit-iobroker-auf-eine-home-assista --> ## Changelog + +### __WORK IN PROGRESS__ +* (Apollon77) Fix crash cases reported by Sentry + ### 1.1.1 (2022-03-25) * (Apollon77) Show password fields masked again in config diff --git a/main.js b/main.js index 0e3659a..b6506fa 100644 --- a/main.js +++ b/main.js @@ -383,7 +383,7 @@ function main() { } if (entity.attributes) { for (const attr in entity.attributes) { - if (!entity.attributes.hasOwnProperty(attr) || attr === 'friendly_name' || attr === 'unit_of_measurement' || attr === 'icon') { + if (!entity.attributes.hasOwnProperty(attr) || attr === 'friendly_name' || attr === 'unit_of_measurement' || attr === 'icon'|| !attr.length) { continue; } let val = entity.attributes[attr];