Skip to content

stream: readable.push(undefined) behaviour? #29765

Description

@ronag

Noticed this while working on #29762.

What is the expected behaviour of:

const readable = new Readable({ objectMode: false });
readable.push(); // readable.push(undefined);

It seems to get through chunkInvalid https://github.com/nodejs/node/blob/master/lib/_stream_readable.js#L340

But can later fail with a null ref at Stream._uint8ArrayToBuffer https://github.com/nodejs/node/blob/master/lib/_stream_readable.js#L279

Unless I'm missing something, shouldn't it really be a ERR_INVALID_ARG_TYPE?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions