From dec08529be5638096f29074185c1f916049213dc Mon Sep 17 00:00:00 2001 From: hobbyquaker Date: Fri, 8 Nov 2019 20:16:09 +0100 Subject: [PATCH] handle numeric zero topic replacements (#100) --- nodes/ccu-connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/ccu-connection.js b/nodes/ccu-connection.js index f19a83e..8968dce 100644 --- a/nodes/ccu-connection.js +++ b/nodes/ccu-connection.js @@ -2345,7 +2345,7 @@ module.exports = function (RED) { rkey = 'iface'; } - topic = topic.replace(rx, msgLower[rkey] || ''); + topic = topic.replace(rx, typeof msgLower[rkey] === 'undefined' ? '' : msgLower[rkey]); }); }