Skip to content

Conversation

@salemkode
Copy link

fix(convex-query-client): prevent crash when unsubscribing missing query subscription

This fixes a TypeError: Cannot read property 'unsubscribe' of undefined
that occurred when a query was removed before its subscription was fully
established. We now safely check for the subscription before calling
unsubscribe().


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@salemkode
Copy link
Author

image I have issues that when I use react query with other convex react hooks.

@thomasballinger
Copy link
Collaborator

@salemkode in what situations does this happen? This is an invariant that I'd want to know if it was broken; are other query users removing these, are other clients allowed to remove these? I'd love to know how your'e seeing this, and to add a comment here with why this could already be gone.

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