mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3526 from node-red-hitachi/fix-status-reference-in-debug-node
fix reference error of msg.status in debug node
This commit is contained in:
commit
4706e20a1d
@ -108,7 +108,9 @@ module.exports = function(RED) {
|
||||
}
|
||||
})
|
||||
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();
|
||||
return;
|
||||
}
|
||||
@ -129,7 +131,8 @@ module.exports = function(RED) {
|
||||
fill = "red";
|
||||
st = msg.error.message;
|
||||
}
|
||||
if (hasOwnProperty.call(msg, "status")) {
|
||||
if (hasOwnProperty.call(msg, "status") &&
|
||||
msg.status) {
|
||||
fill = msg.status.fill || "grey";
|
||||
shape = msg.status.shape || "ring";
|
||||
st = msg.status.text || "";
|
||||
|
Loading…
Reference in New Issue
Block a user