-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: 'room-changed' event race condition #35371
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: ab6bf4d The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35371 +/- ##
===========================================
- Coverage 59.64% 59.64% -0.01%
===========================================
Files 2828 2828
Lines 68539 68533 -6
Branches 15193 15192 -1
===========================================
- Hits 40883 40879 -4
+ Misses 25008 25006 -2
Partials 2648 2648
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Co-authored-by: Douglas Fabris <devfabris@gmail.com>
dougfabris
left a comment
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.
Looks good to me!
|
Proposed changes (including videos or screenshots)
The
room-changedevent was misfiring due to theRoomManager.openfunction being called before the listener was attached.First time entering a room would work correctly, but after cache is available in the
useOpenRoomhook,RoomProvideris able to render using said cache, before the queryFn would rerun with the new room data.This caused the event to not fire after returnning the first time to a room, and subsequent events would dispatch the previous room's data.
Issue(s)
SUP-746
Steps to test or reproduce
messageevent listener to the window (parent.addEventListener('message', ...))Further comments