Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Conversation

@joarley
Copy link

@joarley joarley commented Dec 26, 2015

No description provided.

@Reggino
Copy link
Collaborator

Reggino commented Dec 28, 2015

Thanks for this. Could you please add a test to prevent regression errors in the future? Thanks

@joarley
Copy link
Author

joarley commented Jan 5, 2016

yes, I will do.

lib/index.js Outdated
var _id;
if (options._id) {
_id = this.tryParseObjectId(options._id) || options._id;
options._id = this.tryParseObjectId(options._id) || options._id;
Copy link

Choose a reason for hiding this comment

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

You are now mutating the options object passed in, this is considered a bad practice and can lead to some hard to track down bugs...

Copy link
Author

Choose a reason for hiding this comment

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

Ok, you're right. I fixed the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants