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

fix: Unregister callbacks when the database (and callbacks) are dropped #24

Closed

Conversation

fl0rek
Copy link
Contributor

@fl0rek fl0rek commented Aug 7, 2024

Similar to #23 we encountered this problem when porting to rexie 0.6
Old db callbacks aren't being unregistered now, so dropping the db may result in dropped version change closure being called. Add unregistering callbacks, if they were set by us.

Old db callbacks aren't being unregistered now, so dropping the db
may result in dropped version change closure being called. Add
unregistering callbacks, if they were set by us.

Co-authored-by: Yiannis Marangos <[email protected]>
@fl0rek fl0rek changed the title fix: Fix re-opening the database fix: Unregister callbacks when the database (and callbacks) are dropped Aug 7, 2024
@fl0rek
Copy link
Contributor Author

fl0rek commented Aug 13, 2024

@devashishdxt I'm going to close this one as the close() workaround works for us. Thanks for the help!

I'm still worried this is a bit of a footgun, maybe there should be note about dropping Database and Rexie in the docs? I can open the PRs if you don't mind.

@fl0rek fl0rek closed this Aug 13, 2024
@devashishdxt
Copy link
Owner

Thanks @fl0rek. Please feel free to open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants