Skip to content

Commit

Permalink
fix: make RecognizeStream.readableObjectMode always return Boolean (#943
Browse files Browse the repository at this point in the history
)

BREAKING CHANGE: `RecognizeStream.readableObjectMode` will always be a Boolean value - before, it could have been `undefined`.
  • Loading branch information
MasterOdin authored and dpopp07 committed Oct 4, 2019
1 parent 950ed81 commit a276df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/recognize-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ class RecognizeStream extends Duplex {
delete options.objectMode;
}
super(options);
if (options.readableObjectMode && this.readableObjectMode === undefined) {
this.readableObjectMode = true;
if (this.readableObjectMode === undefined) {
this.readableObjectMode = options.readableObjectMode === true;
}
this.options = options;
this.listening = false;
Expand Down

0 comments on commit a276df4

Please sign in to comment.