fix: handle case data = 0 in writeFile
This commit is contained in:
parent
90db749ee5
commit
7bd6e5f4e1
|
@ -1873,6 +1873,7 @@ function writeFile(context, path, data, options, callback) {
|
|||
if(typeof data === 'number') {
|
||||
data = '' + data;
|
||||
}
|
||||
data = data || '';
|
||||
if(typeof data !== 'string') {
|
||||
data = Buffer.from(data.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue