mirror of https://github.com/node-red/node-red.git
Fix status node to retrieve status from all nodes
parent
6a75a084ad
commit
cc1662ab5c
|
|
@ -20,13 +20,15 @@ module.exports = function(RED) {
|
|||
function StatusNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
var node = this;
|
||||
this.scope = n.scope || [];
|
||||
this.scope = n.scope;
|
||||
|
||||
// auto-filter out any directly connected nodes to avoid simple loopback
|
||||
const w = this.wires.flat();
|
||||
for (let i=0; i < this.scope.length; i++) {
|
||||
if (w.includes(this.scope[i])) {
|
||||
this.scope.splice(i, 1);
|
||||
if (Array.isArray(this.scope)) {
|
||||
const w = this.wires.flat();
|
||||
for (let i = 0; i < this.scope.length; i++) {
|
||||
if (w.includes(this.scope[i])) {
|
||||
this.scope.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue