8000 operator || · Issue #40699 · nodejs/node · GitHub
[go: up one dir, main page]

Skip to content
operator || #40699
@essential-existence

Description

@essential-existence

position = bufferOrOptions.position || null;

If the value is "0", it is converted to "null", which causes the low-level read position of the file to be taken into account. I suggest:
position = bufferOrOptions.position ?? null;.

Operator || - this evil!

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0