Skip to content

Commit

Permalink
use Array.prototype.includes
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Dec 22, 2021
1 parent e900adf commit ca8887e
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 ca8887e

Please sign in to comment.