1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
This commit is contained in:
Phil Day 2022-05-09 16:20:27 +01:00 committed by GitHub
parent 3d3090a8f2
commit 98d524e82d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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