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

Only NLS status text that starts with a letter

Fixes #2128
This commit is contained in:
Nick O'Leary 2019-05-17 16:32:14 +01:00
parent 6a57d25f4a
commit cc051544f9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -347,10 +347,8 @@ var RED = (function() {
var parts = topic.split("/");
var node = RED.nodes.node(parts[1]);
if (node) {
if (msg.hasOwnProperty("text")) {
if (msg.text[0] !== ".") {
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
}
if (msg.hasOwnProperty("text") && /^[a-zA-Z]/.test(msg.text)) {
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
}
node.status = msg;
node.dirty = true;