diff --git a/CHANGELOG.md b/CHANGELOG.md index b30abb4c..15fde3fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 3.2.1: Maintenance Release + - Fix topic return when topic is falsey. Issue #784 - Fix notification toast class. Issue #776 - Fix z-index of dropdown items. Issue #775 diff --git a/dist/dashboard.appcache b/dist/dashboard.appcache index 908f2a85..6617b227 100644 --- a/dist/dashboard.appcache +++ b/dist/dashboard.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# Time: Fri Oct 28 2022 16:27:22 GMT+0100 (British Summer Time) +# Time: Sun Nov 20 2022 10:57:19 GMT+0000 (Greenwich Mean Time) CACHE: i18n.js diff --git a/nodes/ui_colour_picker.js b/nodes/ui_colour_picker.js index 074da488..471ec612 100644 --- a/nodes/ui_colour_picker.js +++ b/nodes/ui_colour_picker.js @@ -49,7 +49,7 @@ module.exports = function(RED) { if (node.format === 'hsv') { msg.payload = pay.toHsv(); } } var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } }, convert: function(p,o,m) { if (m.payload === undefined || m.payload === null) { return; } diff --git a/nodes/ui_date_picker.js b/nodes/ui_date_picker.js index c0aa10b5..c33ef549 100644 --- a/nodes/ui_date_picker.js +++ b/nodes/ui_date_picker.js @@ -45,7 +45,7 @@ module.exports = function(RED) { }, beforeSend: function (msg) { var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } } }); node.on("close", done); diff --git a/nodes/ui_dropdown.js b/nodes/ui_dropdown.js index a24fd9c9..5837bb03 100644 --- a/nodes/ui_dropdown.js +++ b/nodes/ui_dropdown.js @@ -181,7 +181,7 @@ module.exports = function(RED) { msg.payload = emitOptions.value; } var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } if (msg.payload === null || msg._dontSend) { node.status({}); } else { var stat = ""; diff --git a/nodes/ui_form.js b/nodes/ui_form.js index ad8af7a4..3bd06695 100644 --- a/nodes/ui_form.js +++ b/nodes/ui_form.js @@ -37,7 +37,7 @@ module.exports = function(RED) { }, beforeSend: function (msg) { var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } } }); node.on("close", done); diff --git a/nodes/ui_numeric.js b/nodes/ui_numeric.js index 56ee5782..2f5b839e 100644 --- a/nodes/ui_numeric.js +++ b/nodes/ui_numeric.js @@ -43,7 +43,7 @@ module.exports = function(RED) { beforeSend: function (msg) { msg.payload = parseFloat(msg.payload); var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } if (node.pt) { node.status({shape:"dot",fill:"grey",text:msg.payload}); } diff --git a/nodes/ui_slider.js b/nodes/ui_slider.js index 5f843c06..17f2c7a5 100644 --- a/nodes/ui_slider.js +++ b/nodes/ui_slider.js @@ -39,7 +39,7 @@ module.exports = function(RED) { }, beforeSend: function (msg) { var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } if (node.pt) { node.status({shape:"dot",fill:"grey",text:msg.payload}); } diff --git a/nodes/ui_switch.js b/nodes/ui_switch.js index e4858cf7..2493dc78 100644 --- a/nodes/ui_switch.js +++ b/nodes/ui_switch.js @@ -135,7 +135,7 @@ module.exports = function(RED) { }, beforeSend: function (msg) { var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } } }); diff --git a/nodes/ui_text_input.js b/nodes/ui_text_input.js index 57fb2874..a86d1bc6 100644 --- a/nodes/ui_text_input.js +++ b/nodes/ui_text_input.js @@ -41,7 +41,7 @@ module.exports = function(RED) { // if (config.mode === "week") { msg.payload = Date.parse(msg.payload); } // if (config.mode === "month") { msg.payload = Date.parse(msg.payload); } var t = RED.util.evaluateNodeProperty(config.topic,config.topicType || "str",node,msg) || node.topi; - if (t) { msg.topic = t; } + if (t !== undefined) { msg.topic = t; } } }); node.on("close", done);