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 5271c4273..ce9746aa3 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 @@ -925,13 +925,13 @@ module.exports = function(RED) { // so we can't use removeAllListeners() wothout breaking it /** - * Add an event handlers to the MQTT.js client - * @param {string} [event] The name of the event (optional) - * @param {function} [handler] The handler for this event + * Add an event handler to the MQTT.js client + * @param {string} event The name of the event + * @param {function} handler The handler for this event */ - node._clientOn = function(event, f) { - node.clientListeners.push({event, f}) - node.client.on(event, f) + node._clientOn = function(event, handler) { + node.clientListeners.push({event, handler}) + node.client.on(event, handler) } /**