Skip to content

Commit

Permalink
chore: use Array includes
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Jul 18, 2023
1 parent 229f9b0 commit 3e50003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ function optimizeSafeRealPathSync() {
try {
fs.realpathSync.native(path.resolve('./'))
} catch (error) {
if (~error.message.indexOf('EISDIR: illegal operation on a directory')) {
if (error.message.includes('EISDIR: illegal operation on a directory')) {
safeRealpathSync = fs.realpathSync
return
}
Expand Down

0 comments on commit 3e50003

Please sign in to comment.