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

fix numeric status not displaying by ensuring it's a string
pull/2879/head
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
1 changed files with 6 additions and 0 deletions

View File

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