Skip to content

Commit

Permalink
fix double cache check
Browse files Browse the repository at this point in the history
  • Loading branch information
antonk52 committed Nov 16, 2023
1 parent de7ad2a commit 5c6e3ac
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,6 @@ export function lilconfigSync(

for (const searchPlace of searchPlaces) {
const filepath = path.join(dir, searchPlace);
if (cache) {
if (searchCache.has(dir)) {
const r = searchCache.get(dir) as R;
for (const p of visited) searchCache.set(p, r);
return r;
} else {
visited.has(dir) || visited.add(dir);
}
}
try {
fs.accessSync(filepath);
} catch {
Expand Down

0 comments on commit 5c6e3ac

Please sign in to comment.