Skip to content

Conversation

daprahamian
Copy link
Contributor

Calling remove with no arguments resulted in an error b/c
of the lack of options.

Fixes NODE-1287

@mbroadst @jlord I'm wondering if we should instead fix this in executeOperation?

@@ -1236,6 +1236,8 @@ Collection.prototype.remove = function(selector, options, callback) {
options.ignoreUndefined = this.s.options.ignoreUndefined;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we actually need a whole:

if (typeof options === 'function') (callback = options), (options = {});
options = options || {};

// Add ignoreUndefined....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to include that

Calling remove with no arguments resulted in an error b/c
of the lack of options.

Fixes NODE-1287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants