mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix reference error of msg.status in debug node
This commit is contained in:
parent
0aa80d82d9
commit
226f45d8d5
@ -108,7 +108,9 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.on("input", function(msg, send, done) {
|
this.on("input", function(msg, send, done) {
|
||||||
if (hasOwnProperty.call(msg, "status") && hasOwnProperty.call(msg.status, "source") && hasOwnProperty.call(msg.status.source, "id") && (msg.status.source.id === node.id)) {
|
if (hasOwnProperty.call(msg, "status") && msg.status &&
|
||||||
|
hasOwnProperty.call(msg.status, "source") && msg.status.source &&
|
||||||
|
hasOwnProperty.call(msg.status.source, "id") && (msg.status.source.id === node.id)) {
|
||||||
done();
|
done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -129,7 +131,8 @@ module.exports = function(RED) {
|
|||||||
fill = "red";
|
fill = "red";
|
||||||
st = msg.error.message;
|
st = msg.error.message;
|
||||||
}
|
}
|
||||||
if (hasOwnProperty.call(msg, "status")) {
|
if (hasOwnProperty.call(msg, "status") &&
|
||||||
|
msg.status) {
|
||||||
fill = msg.status.fill || "grey";
|
fill = msg.status.fill || "grey";
|
||||||
shape = msg.status.shape || "ring";
|
shape = msg.status.shape || "ring";
|
||||||
st = msg.status.text || "";
|
st = msg.status.text || "";
|
||||||
|
Loading…
Reference in New Issue
Block a user