Skip to content

Commit a2077aa

Browse files
authored
Merge pull request #11 from gupta-deepak/fix-es6-error
Fix es6 error
2 parents bc52f38 + 2f06977 commit a2077aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ function fileExists (filepath, options, done) {
3131
})
3232
}
3333

34-
fileExists.sync = function fileExistsSync (filepath = '', options = {}) {
34+
fileExists.sync = function fileExistsSync (filepath, options = {}) {
35+
const filePath = filepath || '';
3536
try {
36-
return fs.statSync(fullPath(filepath, options)).isFile()
37+
return fs.statSync(fullPath(filePath, options)).isFile()
3738
}
3839
catch (e) {
3940
// Check exception. If ENOENT - no such file or directory ok, file doesn't exist.

0 commit comments

Comments
 (0)