Change == to === to prevent accepting undefined

This commit is contained in:
MuchtarSalimov 2018-10-09 17:34:17 -04:00 committed by GitHub
parent f8fb920515
commit df57e35500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1875,7 +1875,7 @@ function appendFile(fs, context, path, data, options, callback) {
if(typeof data === 'number') {
data = '' + data;
}
if(typeof data === 'string' && (options.encoding == null || options.encoding === 'utf8')) {
if(typeof data === 'string' && (options.encoding === null || options.encoding === 'utf8')) {
data = Encoding.encode(data);
}