From f6ed30fdf9c880d1fa283328328036e22953831c Mon Sep 17 00:00:00 2001 From: hobbyquaker Date: Thu, 5 Dec 2019 17:19:59 +0100 Subject: [PATCH] catch race condition (#72) --- nodes/converter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/converter.js b/nodes/converter.js index ec33fdf..1d54e68 100644 --- a/nodes/converter.js +++ b/nodes/converter.js @@ -96,7 +96,7 @@ module.exports = function (RED) { this.debug('topic=' + msg.topic + ' name=' + name + ' ieeeAddr=' + ieeeAddr + ' attribute=' + attribute + ' payload=' + JSON.stringify(msg.payload)); if (!device) { - group = this.groups.find(g => g.meta.name === topicAttrs.name); + group = this.groups && this.groups.find(g => g.meta.name === topicAttrs.name); if (group) { isGroup = true; } else {