From de0546b251b2cf707cdcfdfb55ff8d58bef0b1a0 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 11 Sep 2024 15:23:03 +0100 Subject: [PATCH] Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com> --- packages/node_modules/@node-red/nodes/core/network/10-mqtt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js index 9e707fa68..f91a7c7d7 100644 --- a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js +++ b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js @@ -696,7 +696,7 @@ module.exports = function(RED) { // Ensure will payload, if set, is a string if (node.options.will && Object.hasOwn(node.options.will, 'payload')) { let payload = node.options.will.payload - if (payload === null || payload === undefined) { + if (payload === null || typeof payload === 'undefined') { payload = ""; } else if (!Buffer.isBuffer(payload)) { if (typeof payload === "object") {