diff --git a/weli_hobu_garage_door/hobu.js b/weli_hobu_garage_door/hobu.js index 50a479a..49716da 100644 --- a/weli_hobu_garage_door/hobu.js +++ b/weli_hobu_garage_door/hobu.js @@ -59,5 +59,9 @@ function handleGlobalCheck(data) { function filterGarageEntry(data) { const keyword = Conf.keywords.garage - return data.whatswrong.filter(function(entry) { return entry.msgOnErr.indexOf(keyword) >= 0 }) -} \ No newline at end of file + if(data.whatswrong) { + return []; + } else { + return data.whatswrong.filter(function(entry) { return entry.msgOnErr.indexOf(keyword) >= 0 }) + } +}