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 error on unmount in syncplay menu #4793

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

thornbill
Copy link
Member

Changes
Fixes a React error when setGroups is called after the component is unmounted.

Using an AbortController might be technically better, but it looks like we would have to polyfill.

Issues
React error printed to console

@thornbill thornbill added the cleanup Cleanup of legacy code or code smells label Sep 20, 2023
@thornbill thornbill requested a review from a team as a code owner September 20, 2023 16:41
@grafixeyehero
Copy link
Member

@thornbill isn't it better if we use tanstack query?

@thornbill
Copy link
Member Author

Ah that's a great point! I didn't even think that it would probably eliminate this issue also...

@grafixeyehero
Copy link
Member

Here is https://tanstack.com/query/latest/docs/react/guides/query-cancellation

@sonarcloud
Copy link

sonarcloud bot commented Sep 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.7% 1.7% Duplication

@thornbill thornbill merged commit 41f6634 into jellyfin:master Sep 27, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Cleanup of legacy code or code smells
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants