diff --git a/lib/fs.js b/lib/fs.js index eb204c000f..0e915aaabc 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -175,8 +175,6 @@ fs.readFile = function(path, options, callback_) { options = { encoding: null, flag: 'r' }; } else if (util.isString(options)) { options = { encoding: options, flag: 'r' }; - } else if (!options) { - options = { encoding: null, flag: 'r' }; } else if (!util.isObject(options)) { throw new TypeError('Bad arguments'); } @@ -919,8 +917,6 @@ fs.writeFile = function(path, data, options, callback) { options = { encoding: 'utf8', mode: 438 /*=0666*/, flag: 'w' }; } else if (util.isString(options)) { options = { encoding: options, mode: 438, flag: 'w' }; - } else if (!options) { - options = { encoding: 'utf8', mode: 438 /*=0666*/, flag: 'w' }; } else if (!util.isObject(options)) { throw new TypeError('Bad arguments'); } @@ -976,8 +972,6 @@ fs.appendFile = function(path, data, options, callback_) { options = { encoding: 'utf8', mode: 438 /*=0666*/, flag: 'a' }; } else if (util.isString(options)) { options = { encoding: options, mode: 438, flag: 'a' }; - } else if (!options) { - options = { encoding: 'utf8', mode: 438 /*=0666*/, flag: 'a' }; } else if (!util.isObject(options)) { throw new TypeError('Bad arguments'); }