From df57e35500698d0a6f5fdedc69652032eede13d3 Mon Sep 17 00:00:00 2001 From: MuchtarSalimov Date: Tue, 9 Oct 2018 17:34:17 -0400 Subject: [PATCH] Change == to === to prevent accepting undefined --- src/filesystem/implementation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/implementation.js b/src/filesystem/implementation.js index 6f69631..b4c65f4 100644 --- a/src/filesystem/implementation.js +++ b/src/filesystem/implementation.js @@ -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); }