Skip to content

Commit 56922e9

Browse files
committed
[STREAM-990] Store a copy of pendingSessions in the demo app so freezing them doesn't affect the SDK using and mutating them
1 parent b1ecb68 commit 56922e9

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

react-demo-app/package-lock.json

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-demo-app/src/hooks/useSdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default function useSdk() {
8787
}
8888

8989
function handlePendingSession(pendingSession: IPendingSession): void {
90-
dispatch(updatePendingSessions(pendingSession));
90+
dispatch(updatePendingSessions({ ...pendingSession }));
9191
}
9292
// If a pendingSession was cancelled or handled, we can remove it from our state.
9393
function handleCancelPendingSession(sessionInfo: ISessionIdAndConversationId): void {

0 commit comments

Comments
 (0)