Skip to content

Commit

Permalink
fix(ChangeStream): add _bindEvents to addListener function
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Ivaniutsenka committed Aug 21, 2023
1 parent c8cd96e commit 68373c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cursor/ChangeStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class ChangeStream extends EventEmitter {
return this.driverChangeStream.next(cb);
}

addListener(event, handler) {
this._bindEvents();
return super.addListener(event, handler);
}

on(event, handler) {
this._bindEvents();
return super.on(event, handler);
Expand Down

0 comments on commit 68373c9

Please sign in to comment.