mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
new-style callback function (inject node)
This commit is contained in:
parent
8b36279e52
commit
756a6ec5aa
@ -98,7 +98,7 @@ module.exports = function(RED) {
|
||||
node.repeaterSetup();
|
||||
}
|
||||
|
||||
this.on("input", function(msg) {
|
||||
this.on("input", function(msg, send, done) {
|
||||
var errors = [];
|
||||
|
||||
this.props.forEach(p => {
|
||||
@ -128,9 +128,10 @@ module.exports = function(RED) {
|
||||
});
|
||||
|
||||
if (errors.length) {
|
||||
node.error(errors.join('; '), msg);
|
||||
done(errors.join('; '));
|
||||
} else {
|
||||
node.send(msg);
|
||||
send(msg);
|
||||
done();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user