mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Move debug status text length check to just before dsiplay.
This commit is contained in:
parent
1d36ce0fdf
commit
a600feb5de
@ -104,7 +104,6 @@ module.exports = function(RED) {
|
|||||||
if (err) { node.error(err); return; }
|
if (err) { node.error(err); return; }
|
||||||
var output = debugMsg.msg;
|
var output = debugMsg.msg;
|
||||||
var st = (typeof output === 'string') ? output : util.inspect(output);
|
var st = (typeof output === 'string') ? output : util.inspect(output);
|
||||||
if (st.length > 32) { st = st.substr(0,32) + "..."; }
|
|
||||||
var fill = "grey";
|
var fill = "grey";
|
||||||
var shape = "dot";
|
var shape = "dot";
|
||||||
if (node.statusType === "auto") {
|
if (node.statusType === "auto") {
|
||||||
@ -118,6 +117,7 @@ module.exports = function(RED) {
|
|||||||
if (msg.status.hasOwnProperty("text")) { st = msg.status.text; }
|
if (msg.status.hasOwnProperty("text")) { st = msg.status.text; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (st.length > 32) { st = st.substr(0,32) + "..."; }
|
||||||
node.status({fill:fill, shape:shape, text:st});
|
node.status({fill:fill, shape:shape, text:st});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user