We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you declare an schema such as:
var userSchema = new Schema({ username: String, _password: String })
That's perfectly valid for mongoose, toJSON will show the field _password because it's not detected properly in isPrivate method.
toJSON
_password
isPrivate
Atm, this is the ifthat fails:
if
else if(_.isObject(node) && !node.type && !node.getters) {
since node is the type String (internally that's a function) and underscore returns isObject as true.
Maybe the solution is like
else if(_.isObject(node) && !_.isFunction(node) && !node.type && !node.getters) {
The text was updated successfully, but these errors were encountered:
Yeah... I'll think of something, thanks for the report! A PR would be greatly appreciated, since I'm not that free on time at the moment.
Sorry, something went wrong.
ad3ce5d
No branches or pull requests
If you declare an schema such as:
That's perfectly valid for mongoose,
toJSON
will show the field_password
because it's not detected properly inisPrivate
method.Atm, this is the
if
that fails:since node is the type String (internally that's a function) and underscore returns isObject as true.
Maybe the solution is like
The text was updated successfully, but these errors were encountered: