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

clean does nothing if object has a length property #152

Closed
gandev opened this Issue Jun 21, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@gandev

gandev commented Jun 21, 2017

const schema = new SimpleSchema({ prop1: String });

schema.clean({_id: 1, prop1: 't', length: 5});
==> returns {_id: 1, prop1: "t", length: 5} and keeps all the props

schema.clean({_id: 1, prop1: 't', length: null});
==> returns {prop1: "t"} as expected

Same outcome if "length" prop is part of the schema.

@DuriDuri

This comment has been minimized.

Show comment
Hide comment
@DuriDuri

DuriDuri Nov 8, 2017

Collaborator

Hi @gandev, the solution to the problem has been addressed in version 0.4.1 of node-simple-schema

Collaborator

DuriDuri commented Nov 8, 2017

Hi @gandev, the solution to the problem has been addressed in version 0.4.1 of node-simple-schema

@DuriDuri DuriDuri closed this Nov 8, 2017

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