Merge pull request #3219 from Steve-Mcl/mqtt-use-datatype

fix datatype in node config not used. fixes #3215
This commit is contained in:
Nick O'Leary 2021-10-24 22:58:36 +01:00 committed by GitHub
commit e57183ed0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1040,7 +1040,7 @@ module.exports = function(RED) {
//subscribe to sub.topic & hook up subscriptionHandler
node.brokerConn.subscribe(sub.topic, options, function (topic, payload, packet) {
subscriptionHandler(node, sub.datatype, topic, payload, packet);
subscriptionHandler(node, sub.datatype || node.datatype, topic, payload, packet);
}, node.id);
node.dynamicSubs[sub.topic] = sub; //save for later unsubscription & 'list' action
})