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

Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
pull/4873/head
Nick O'Leary 2024-09-11 15:23:03 +01:00 committed by GitHub
parent 7f77a414ec
commit de0546b251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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") {