Skip to content

Commit

Permalink
fix stompClient not connected when handle message read
Browse files Browse the repository at this point in the history
  • Loading branch information
GayChin committed Apr 17, 2024
1 parent bd6918d commit 8aab971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/matches/chatroom/chatroom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const Chatroom = () => {
observer.unobserve(element);
});
};
}, [messages]); // Now the effect depends on the messages array
}, [messages, stompClient]); // Now the effect depends on the messages array

useEffect(() => {
let client: Client;
Expand Down

0 comments on commit 8aab971

Please sign in to comment.