diff --git a/lib/change_stream.js b/lib/change_stream.js index 4233c35837..0c0f5337fa 100644 --- a/lib/change_stream.js +++ b/lib/change_stream.js @@ -71,6 +71,8 @@ var ChangeStream = function(collection, pipeline, options) { }); }; +inherits(ChangeStream, EventEmitter); + // Create a new change stream cursor based on self's configuration var createChangeStreamCursor = function(self) { if (self.resumeToken) { @@ -354,6 +356,4 @@ var processNewChange = function(self, err, change, callback) { * @param {(object|null)} result The result object if the command was executed successfully. */ -inherits(ChangeStream, EventEmitter); - module.exports = ChangeStream;