Permalink
Browse files

determine if fs.existSync exists, else use path

  • Loading branch information...
1 parent a964396 commit e7d0208b2148b2dcb4a23a638d49e4d53fe2d86a @schinken schinken committed Aug 7, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 index.js
View
@@ -17,6 +17,7 @@ exports.sync = function (x, opts) {
if (!opts) opts = {};
var isFile = opts.isFile || function (file) {
+ var obj = fs.existsSync ? fs : path;
return path.existsSync(file) && fs.statSync(file).isFile()
};
var readFileSync = opts.readFileSync || fs.readFileSync;

0 comments on commit e7d0208

Please sign in to comment.