diff --git a/lib/nconf/stores/file.js b/lib/nconf/stores/file.js index 87449af..05d33ec 100644 --- a/lib/nconf/stores/file.js +++ b/lib/nconf/stores/file.js @@ -9,7 +9,8 @@ var fs = require('fs'), path = require('path'), util = require('util'), formats = require('../formats'), - Memory = require('./memory').Memory; + Memory = require('./memory').Memory, + existsSync = fs.existsSync || path.existsSync; // // ### function File (options) @@ -113,7 +114,7 @@ File.prototype.load = function (callback) { File.prototype.loadSync = function () { var data, self = this; - if (!path.existsSync(self.file)) { + if (!existsSync(self.file)) { self.store = {}; data = {}; }