mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix node.status to check hasOwnProperty("text")
This commit is contained in:
parent
c5753a013c
commit
e360e57a5b
@ -81,7 +81,7 @@ var RED = (function() {
|
|||||||
var parts = topic.split("/");
|
var parts = topic.split("/");
|
||||||
var node = RED.nodes.node(parts[1]);
|
var node = RED.nodes.node(parts[1]);
|
||||||
if (node) {
|
if (node) {
|
||||||
if (msg.text) {
|
if (msg.hasOwnProperty("text")) {
|
||||||
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
|
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
|
||||||
}
|
}
|
||||||
node.status = msg;
|
node.status = msg;
|
||||||
|
@ -193,8 +193,8 @@ function Flow(global,flow) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (statusMessage.text) {
|
if (statusMessage.hasOwnProperty("text")) {
|
||||||
message.status.text = statusMessage.text;
|
message.status.text = statusMessage.text.toString();
|
||||||
}
|
}
|
||||||
targetStatusNode.receive(message);
|
targetStatusNode.receive(message);
|
||||||
handled = true;
|
handled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user