1
0
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:
Dave Conway-Jones 2016-07-06 17:22:45 +01:00
parent c5753a013c
commit e360e57a5b
2 changed files with 9 additions and 9 deletions

View File

@ -81,7 +81,7 @@ var RED = (function() {
var parts = topic.split("/");
var node = RED.nodes.node(parts[1]);
if (node) {
if (msg.text) {
if (msg.hasOwnProperty("text")) {
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
}
node.status = msg;

View File

@ -193,8 +193,8 @@ function Flow(global,flow) {
}
}
};
if (statusMessage.text) {
message.status.text = statusMessage.text;
if (statusMessage.hasOwnProperty("text")) {
message.status.text = statusMessage.text.toString();
}
targetStatusNode.receive(message);
handled = true;