Skip to content

Duplex stream is not returning whether it is in object mode correctly #33388

Description

@alesmenzel
  • Version: v12.16.0
  • Platform: MacOS
  • Subsystem: Darwin ... 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

What steps will reproduce the bug?

// open the node repl
x = new stream.Duplex({writableObjectMode: true})
x.writableObjectMode // undefined - should be true

but the mode is set correctly:

...
_writableState: WritableState {
    objectMode: true,
   ...

it does work on a Writable stream:

x = new stream.Writable({objectMode: true})
x.writableObjectMode // true

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior?

Return the actual value of whether the stream is in object mode.

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

    confirmed-bugIssues and PRs for confirmed bugs.streamIssues and PRs related to Node.js streams.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions