-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix(core): Make flattenRoutePath return a valid module #15333
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
base: master
Are you sure you want to change the base?
fix(core): Make flattenRoutePath return a valid module #15333
Conversation
Pull Request Test Coverage Report for Build c0ed7f7f-16b3-411f-a1ed-493630fb1838Details
💛 - Coveralls |
path: 'child3', | ||
children: [ | ||
{ | ||
path: '', |
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.
could you also add the case where path: '/'
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.
sure thing. To better understand your suggestion, are you asking for the root parent of a route or for any child inside it?
Just in case, this PR only tries to fix the case where the path is an empty string the module
property would be set to be the object being passed as a route configuration. That derives to the actual module not having the MODULE_PATH
metadata set due to the fact that the metadata is set to a plain object instead.
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.
root can be anything but the child will have the path: '/'
just for completeness sake
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.
I've just added it. Let me know if that feels good to you. Thanks.
flattenRoutePath method was returning an object instead of a module when path property was an empty string closes nestjs#15332
515bfcf
to
8cbbcf4
Compare
build-and-test is failing codechecks and based on the error logs it looks like it's due to maintenance:
|
flattenRoutePath method was returning an object instead of a module when path property was an empty string
closes #15332
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #15332
What is the new behavior?
Does this PR introduce a breaking change?
Other information