fs: remove unnecessary else statement

PR-URL: https://github.com/nodejs/node/pull/32662
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
Jesus Hernandez authored and Luigi Pinca committed 2020-04-19 07:58:44 +02:00
1 parent 83f7bb441f
commit a6a15fefb6
1 file changed
+2 -5
+2 -5
View File
@@ -188,11 +188,8 @@ async function readFileHandle(filehandle, options) {
} while (!endOfFile);
const result = Buffer.concat(chunks);
if (options.encoding) {
return result.toString(options.encoding);
} else {
return result;
}
return options.encoding ? result.toString(options.encoding) : result;
}
// All of the functions are defined as async in order to ensure that errors