fs: nullish coalescing to respect zero positional reads
When the file read position is moved passing zero is not respected and `null` is used instead. PR fixes the issues by using nullish coalescing which will return the rhs only when the lhs is `null` or `undefined`; respecting the zero. Fixes: https://github.com/nodejs/node/issues/40715 PR-URL: https://github.com/nodejs/node/pull/40716 Fixes: https://github.com/nodejs/node/issues/40699 Reviewed-By:Robert Nagy <ronagy@icloud.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Evan Lucas <evanlucas@me.com>
parent
055a38b4
Please register or sign in to comment