Skip to content

Commit

Permalink
Update useIPScanner.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Mar 2, 2024
1 parent 4ca7c65 commit 571df76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useIPScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ export const useIPScanner = ({ allIps }: IPScannerProps) => {
async function startScan() {
reset();
try {
dispatch({ scanState: "scanning" });
setToIdle();
const ips = state.ipRegex
? allIps.filter((el) => new RegExp(state.ipRegex).test(el))
: allIps;

dispatch({ scanState: "scanning" });
await testIPs(randomizeElements(ips));
setToIdle();
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit 571df76

Please sign in to comment.