Update implementation.js

This commit is contained in:
MuchtarSalimov 2018-10-16 14:07:26 -04:00 committed by GitHub
parent b3224a213a
commit eb2c77bd93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1871,14 +1871,14 @@ function appendFile(fs, context, path, data, options, callback) {
return callback(new Errors.EINVAL('flags is not valid', path));
}
if typeof (options ==== 'object') {
if (typeof options ==== 'object') {
if (options.encoding === undefined) {
options.encoding = 'utf8';
}
if (options.mode === undefined) {
if (typeof options.mode === undefined) {
options.mode = 0o666;
}
if (options.flag === undefined) {
if (typeof options.flag === undefined) {
options.flag = 'a';
}
}