feat(decorators): throw error if called after start#2128
Conversation
Check if fastify has started when calling decorate* and throw an error if it has. Fix fastify#2116.
|
Before this PR it was possible to call What do you suggest to recover the old behavior? At the moment I could just assign the value directly onto the specific property using edit:... i just saw that I already have some code to mutate the object as it wasn't possible to call the decorate function multiple times. So this was just breaking change that removed support for the delayed |
|
It was not really supported before :/. It worked because there were no real checks for it and possibly worked well in your use case. |
|
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. |
Check if fastify has started when calling decorate* and throw an error if it has.
Fix #2116 .
Checklist
npm run testandnpm run benchmark