Skip to content

Commit

Permalink
chore: simplify isFileReadable
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Oct 26, 2021
1 parent 978e9ab commit 73b01cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vite/src/node/utils.ts
Expand Up @@ -387,8 +387,9 @@ export function isFileReadable(filename: string,) {
try {
fs.accessSync(filename, fs.constants.R_OK)
return true
} catch (e) {}
return false
} catch {
return false
}
}

/**
Expand Down

0 comments on commit 73b01cc

Please sign in to comment.