diff --git a/lib/nconf/stores/file.js b/lib/nconf/stores/file.js index f5d1e8ba..fe35d602 100644 --- a/lib/nconf/stores/file.js +++ b/lib/nconf/stores/file.js @@ -205,7 +205,11 @@ File.prototype.stringify = function (format) { // `this.secure` is enabled. // File.prototype.parse = function (contents) { - var parsed = this.format.parse(contents); + var parsed = {}; + if (typeof contents === 'string' && contents.trim() !== '') { + console.log('22222222') + parsed = this.format.parse(contents); + } if (this.secure) { var self = this;