Skip to content

Commit

Permalink
refactor: replace indexof with includes
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jan 30, 2022
1 parent c130279 commit 14df5a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/resolveId.ts
Expand Up @@ -63,7 +63,7 @@ function findFile(file: string, preserveSymlinks: boolean): string | undefined {
const name = basename(file);
const files = readdirSync(dirname(file));

if (files.indexOf(name) !== -1) return file;
if (files.includes(name)) return file;
}
} catch {
// suppress
Expand Down

0 comments on commit 14df5a1

Please sign in to comment.