-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(schema): avoid returning string 'nested' as schematype #14453
Conversation
@vkarpov15 This looks good to me. Just one query, currently according to the docs, function like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless i missed something, arent the 2 added tests basically the same?
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Not quite, 2nd test is slightly different. But as far as I can tell, the 2nd test is also unnecessary, it passes both with and without the code changes in this PR. |
@hasezoey No, in the first test the |
Fix #14435
Fix #14443
@FaizBShah
Summary
A more "root cause" fix for #14435 than #14443. I think it is incorrect for
_getPath()
to ever return a string: we only want SchemaType instance or nullish. The issue comes from us setting nested paths to'nested'
for nested paths underneath single nested subdocs - if we don't have that, then the test for #9459 starts failing.Examples