Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nullish coalescing to respect zero positional reads #40716

Closed
wants to merge 1 commit into from

Commits on Nov 12, 2021

  1. 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: nodejs#40715
    
    PR-URL: nodejs#40716
    Fixes: nodejs#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>
    mihilmy authored and Trott committed Nov 12, 2021
    Copy the full SHA
    2037ee8 View commit details
    Browse the repository at this point in the history