Skip to content

Commit

Permalink
Fix es6 error
Browse files Browse the repository at this point in the history
  • Loading branch information
gupta-deepak authored Dec 29, 2017
1 parent bc52f38 commit 2f06977
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ function fileExists (filepath, options, done) {
})
}

fileExists.sync = function fileExistsSync (filepath = '', options = {}) {
fileExists.sync = function fileExistsSync (filepath, options = {}) {
const filePath = filepath || '';
try {
return fs.statSync(fullPath(filepath, options)).isFile()
return fs.statSync(fullPath(filePath, options)).isFile()
}
catch (e) {
// Check exception. If ENOENT - no such file or directory ok, file doesn't exist.
Expand Down

0 comments on commit 2f06977

Please sign in to comment.