Skip to content

Commit

Permalink
Fix incorrect unused file in watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Nov 14, 2024
1 parent 9e9c7f8 commit 48850ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/knip/src/util/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const getWatchHandler = async ({
// Remove files no longer referenced
graph.delete(filePath);
analyzedFiles.delete(filePath);
cachedUnusedFiles.add(filePath);
if (filePath.startsWith(cwd)) cachedUnusedFiles.add(filePath);
}
}

Expand Down

0 comments on commit 48850ca

Please sign in to comment.