You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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: