Skip to content

Commit

Permalink
Merge branch 'master' into feat/polls
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Oct 31, 2024
2 parents a214928 + 1a75c2a commit ebf1f57
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [12.4.1](https://github.com/GetStream/stream-chat-react/compare/v12.4.0...v12.4.1) (2024-10-29)


### Bug Fixes

* remove rejected channel query promises from channel query lock ([#2549](https://github.com/GetStream/stream-chat-react/issues/2549)) ([631a928](https://github.com/GetStream/stream-chat-react/commit/631a92890b048363a1adb512de38cc1a90c4b842))

## [12.4.0](https://github.com/GetStream/stream-chat-react/compare/v12.3.0...v12.4.0) (2024-10-29)


Expand Down
9 changes: 6 additions & 3 deletions src/utils/getChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ export const getChannel = async <
if (queryPromise) {
await queryPromise;
} else {
WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid] = theChannel.watch(options);
await WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];
delete WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];
try {
WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid] = theChannel.watch(options);
await WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];
} finally {
delete WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];
}
}

return theChannel;
Expand Down

0 comments on commit ebf1f57

Please sign in to comment.