Skip to content
This repository was archived by the owner on May 17, 2026. It is now read-only.

Commit fe48818

Browse files
committed
Fix the fix
1 parent 0f05db7 commit fe48818

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@ mqttClient.on('message', function(topic, message, packet) {
8787
};
8888

8989
let topicParts = topic.split('/');
90-
const collectdPluginInstance = topicParts.shift().replace(/\-/g, '_');
90+
let collectdPluginInstance = topicParts.shift().replace(/\-/g, '_');
9191
let type;
9292

9393
if (topicParts[0] === 'relay') {
9494
topicParts[0] = 'state';
9595
type = topicParts.join('-');
9696
}
9797
else {
98+
collectdPluginInstance = topicParts.shift().replace(/\-/g, '_');
9899
type = topicParts.pop();
99100
}
100101

0 commit comments

Comments
 (0)