Apply suggestions from code review

This commit is contained in:
Nick O'Leary
2025-06-06 10:58:30 +01:00
committed by GitHub
parent c771b175b1
commit aaa4e60d58
3 changed files with 2 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ module.exports = function(RED) {
this.scope = n.scope;
// auto-filter out any directly connected nodes to avoid simple loopback
const w = this.wires.flat().toString();
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);

View File

@@ -23,7 +23,7 @@ module.exports = function(RED) {
this.scope = n.scope;
// auto-filter out any directly connected nodes to avoid simple loopback
const w = this.wires.flat().toString();
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);