Skip to content

Commit a276df4

Browse files
MasterOdindpopp07
authored andcommitted
fix: make RecognizeStream.readableObjectMode always return Boolean (#943)
BREAKING CHANGE: `RecognizeStream.readableObjectMode` will always be a Boolean value - before, it could have been `undefined`.
1 parent 950ed81 commit a276df4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/recognize-stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ class RecognizeStream extends Duplex {
140140
delete options.objectMode;
141141
}
142142
super(options);
143-
if (options.readableObjectMode && this.readableObjectMode === undefined) {
144-
this.readableObjectMode = true;
143+
if (this.readableObjectMode === undefined) {
144+
this.readableObjectMode = options.readableObjectMode === true;
145145
}
146146
this.options = options;
147147
this.listening = false;

0 commit comments

Comments
 (0)