Skip to content

Commit 4d99536

Browse files
committed
Function setTimeout/Interval wrapper not returing timer id
Fixes node-red#753
1 parent 3453718 commit 4d99536

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

nodes/core/core/80-function.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ module.exports = function(RED) {
9898
func();
9999
},delay);
100100
node.outstandingTimers.push(timerId);
101+
return timerId;
101102
},
102103
clearTimeout: function(id) {
103104
clearTimeout(id);
@@ -109,6 +110,7 @@ module.exports = function(RED) {
109110
setInterval: function(func,delay) {
110111
var timerId = setInterval(func,delay);
111112
node.outstandingIntervals.push(timerId);
113+
return timerId;
112114
},
113115
clearInterval: function(id) {
114116
clearInterval(id);

0 commit comments

Comments
 (0)