mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4454 from node-red/4380-mqtt-undefined-value
Guard against node.broker being undefined
This commit is contained in:
commit
6ec052be18
@ -612,7 +612,7 @@ module.exports = function(RED) {
|
||||
node.brokerurl = node.url;
|
||||
} else {
|
||||
// if the broker is ws:// or wss:// or tcp://
|
||||
if (node.broker.indexOf("://") > -1) {
|
||||
if ((typeof node.broker === 'string') && node.broker.indexOf("://") > -1) {
|
||||
node.brokerurl = node.broker;
|
||||
// Only for ws or wss, check if proxy env var for additional configuration
|
||||
if (node.brokerurl.indexOf("wss://") > -1 || node.brokerurl.indexOf("ws://") > -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user