Change == to === to prevent accepting undefined
This commit is contained in:
parent
f8fb920515
commit
df57e35500
|
@ -1875,7 +1875,7 @@ function appendFile(fs, context, path, data, options, callback) {
|
||||||
if(typeof data === 'number') {
|
if(typeof data === 'number') {
|
||||||
data = '' + data;
|
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);
|
data = Encoding.encode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue