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

Merge pull request #2859 from node-red/fix-numeric-status

fix numeric status not displaying by ensuring it's a string
This commit is contained in:
Nick O'Leary 2021-02-16 14:32:14 +00:00 committed by GitHub
commit 7d04353843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -414,6 +414,12 @@ class Flow {
reportingNode = node; reportingNode = node;
} }
if (!muteStatusEvent) { if (!muteStatusEvent) {
if (statusMessage.hasOwnProperty("text") && typeof(statusMessage.text !== "string")) {
try {
statusMessage.text = statusMessage.text.toString();
}
catch(e) {}
}
events.emit("node-status",{ events.emit("node-status",{
id: node.id, id: node.id,
status:statusMessage status:statusMessage