Fixed connect.js
This commit is contained in:
parent
8f1ac22fa1
commit
bb2d98481f
@ -32,7 +32,7 @@ export function main(ns) {
|
|||||||
const newDevices = ns.scan(current).filter(d => !blacklist.has(d));
|
const newDevices = ns.scan(current).filter(d => !blacklist.has(d));
|
||||||
if(newDevices.length == 0) return [];
|
if(newDevices.length == 0) return [];
|
||||||
if(newDevices.find(d => d == device)) return [...path, device];
|
if(newDevices.find(d => d == device)) return [...path, device];
|
||||||
return newDevices.map(d => find(device, d, [...path, d], all)).find(p => p && p.length);
|
return newDevices.map(d => find(device, d, [...path, d], blacklist)).find(p => p && p.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run
|
// Run
|
||||||
|
Loading…
Reference in New Issue
Block a user