Skip to content
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

Unable to chain factory.onCreate #1

Closed
hellowodl opened this issue Jul 29, 2022 · 1 comment · Fixed by #2
Closed

Unable to chain factory.onCreate #1

hellowodl opened this issue Jul 29, 2022 · 1 comment · Fixed by #2
Labels
bug Something isn't working

Comments

@hellowodl
Copy link

In order to clean up my subscriptions in a way that's as clean as possible, I'd like to be able to chain factory.onCreate.

Currently this is impossible to do.
The factory.onCreate will always be the only function that gets called in the stack.

@mfellner
Copy link
Owner

Thanks for the issue!

Chaining onCreate currently doesn’t work as expected and leads to previously added callbacks being replaced.

This is because the factory stores only a single callback instead of an array.

Should be pretty easy to implement. Feel free to send a PR, or I’ll try to get it done when I have some time.

@mfellner mfellner added the bug Something isn't working label Jul 29, 2022
mfellner added a commit that referenced this issue Jul 31, 2022
fix: allow chaining of onCreate, closes #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants