From 7e17b3475b2a8e36c342589875a01d921daf410e Mon Sep 17 00:00:00 2001 From: Gerrit Linnemann Date: Tue, 6 Feb 2018 18:11:50 +0100 Subject: [PATCH] Helper class used --- weli_hobu_garage_door/hobu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weli_hobu_garage_door/hobu.js b/weli_hobu_garage_door/hobu.js index 548466a..2569d8d 100644 --- a/weli_hobu_garage_door/hobu.js +++ b/weli_hobu_garage_door/hobu.js @@ -59,9 +59,9 @@ function handleGlobalCheck(data) { function filterGarageEntry(data) { const keyword = Conf.keywords.garage - if(data.whatswrong !== undefined) { - return []; - } else { + if(Helper.isDefinedAndNotNull(data.whatswrong)) { return data.whatswrong.filter(function(entry) { return entry.msgOnErr.indexOf(keyword) >= 0 }) + } else { + return []; } }