-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Create shallow copy of the route context config #2827
Conversation
cc @metcoder95 |
|
||
fastify.get('/get', { | ||
schema: schema.schema, | ||
config: Object.assign({}, schema.config) |
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.
Why are you manually copying configs here?
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.
Not sure. I copy/pasted the previous test. I guess it's not needed anymore.
Oh, wow. So sorry, I didn't test the configuration context and reference when implementing. I missed that collateral detail 🙏 |
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.
LGTM
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
If
exposeHeadRoutes
is set totrue
(introduced in #2700), the routeconfig
property will be wrongly altered. This PR fixes it.I've discovered this when working on #2826.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct