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
chore: onRegister reference instance in this #4972
base: main
Are you sure you want to change the base?
Conversation
For onClose avvio has to be patched. |
@@ -66,7 +66,9 @@ module.exports = function override (old, fn, opts) { | |||
instance[kFourOhFour].arrange404(instance) | |||
} | |||
|
|||
for (const hook of instance[kHooks].onRegister) hook.call(this, instance, opts) |
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.
mmm this
was the parent instance, while the instance
was the new one
it does not change too much since we inherit all from the parent
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.
Maybe we'll need to adjust the documentation for that. As if the instance
contains props that the parent
does not, they might face weird situations
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
The base branch was changed.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct