Skip to content

Commit

Permalink
Merge pull request #11 from ratsputin/master
Browse files Browse the repository at this point in the history
replace deprecated RED.events nodes-started with flows:started
  • Loading branch information
DeanCording authored Jan 6, 2025
2 parents 27d91b1 + cdc71ef commit 6243177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-state-machine",
"version": "1.2.0",
"version": "1.2.1",
"description": "A Node Red node for implementing a finite state machine.",
"dependencies": {
"javascript-state-machine": "3.*"
Expand Down
4 changes: 2 additions & 2 deletions state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ module.exports = function(RED) {
}
}

RED.events.on("nodes-started", node.startup);
RED.events.on("flows:started", node.startup);

node.on('close', function() {
RED.events.removeListener("nodes-started", node.startup);
RED.events.removeListener("flows:started", node.startup);
});

node.on('input', function(msg) {
Expand Down

0 comments on commit 6243177

Please sign in to comment.