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

add error msg to sort node

This commit is contained in:
Dave Conway-Jones 2017-12-05 15:01:58 +00:00
parent afce106186
commit 422fbcb0b7
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -79,11 +79,11 @@ module.exports = function(RED) {
return function(x, y) {
var xp = conv(key(x));
var yp = conv(key(y));
if (xp === yp) return 0;
if (xp > yp) return dir;
if (xp === yp) { return 0; }
if (xp > yp) { return dir; }
return -dir;
};
};
}
function send_group(group) {
var key = key_is_payload
@ -104,7 +104,7 @@ module.exports = function(RED) {
msg.parts.index = i;
node.send(msg);
}
};
}
function sort_payload(msg) {
var payload = msg.payload;
@ -168,7 +168,7 @@ module.exports = function(RED) {
if ((max_msgs > 0) && (pending_count > max_msgs)) {
pending = {};
pending_count = 0;
node.error(RED._("sort.too-many"));
node.error(RED._("sort.too-many"),msg);
}
}
@ -179,4 +179,3 @@ module.exports = function(RED) {
RED.nodes.registerType("sort", SortNode);
}