-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibly clone object before cleaning #182
Milestone
Comments
See also Meteor-Community-Packages/meteor-simple-schema#250 It still seems best and easiest to continue mutating in the simple-schema clean method, but do a deep clone (EJSON.clone() maybe) before that in the collection2 code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cleaning in the deny functions needs to mutate the object because that's the only way to alter the doc before it is inserted, but in the other two cases, we can clone to ensure no surprises for the user. Most likely a deep clone is necessary.
Add tests for this, and then fix such that they pass.
The text was updated successfully, but these errors were encountered: