fix numeric status not displaying by ensuring it's a string

This commit is contained in:
Dave Conway-Jones 2021-02-05 11:36:26 +00:00
parent 23f0cd3a26
commit e86f6a841a
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
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