diff --git a/src/filesystem/implementation.js b/src/filesystem/implementation.js index 5e839da..f58542f 100644 --- a/src/filesystem/implementation.js +++ b/src/filesystem/implementation.js @@ -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()); }