Merge pull request #5382 from node-red/fix-delay-node-variable-mode-error

Fix flushing when in variable delay mode
pull/5427/head
Nick O'Leary 2026-01-07 15:16:04 +00:00 committed by GitHub
commit bc4f5feede
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -192,7 +192,8 @@ module.exports = function(RED) {
}
done();
}, delayvar, () => done());
node.idList.push(id);
if (Object.keys(msg).length === 2 && msg.hasOwnProperty("flush")) { id.clear(); }
else { node.idList.push(id); }
if (msg.hasOwnProperty("reset")) { clearDelayList(true); }
if (msg.hasOwnProperty("flush")) { flushDelayList(msg.flush); done(); }
if (delayvar >= 0) {