1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3472 from Steve-Mcl/fix-mqtt-setboolprop

fix: ensure mqtt v5 props can be set false
This commit is contained in:
Nick O'Leary 2022-03-07 12:47:01 +00:00 committed by GitHub
commit 95fe717ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ module.exports = function(RED) {
if(src[propName] === "true" || src[propName] === true) { if(src[propName] === "true" || src[propName] === true) {
dst[propName] = true; dst[propName] = true;
} else if(src[propName] === "false" || src[propName] === false) { } else if(src[propName] === "false" || src[propName] === false) {
dst[propName] = true; dst[propName] = false;
} }
} else { } else {
if(def != undefined) dst[propName] = def; if(def != undefined) dst[propName] = def;