Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
Ben Hardill 2024-10-08 16:51:09 +01:00 committed by GitHub
parent 21832a0bd0
commit d50ccea017
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,12 +161,12 @@ module.exports = function(RED) {
if(typeof val === "string") {
count++;
_clone[key] = val;
} else {
count++;
} else if (val !== undefined && val !== null) {
try {
_clone[key] = JSON.stringify(val)
count++;
} catch (err) {
console.log('MQTT v5 Property value can not be converted to a String')
// Silently drop property
}
}
});