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 []; } }