Skip to content

Commit

Permalink
fix: prevent duplicate dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardzjl committed Feb 21, 2024
1 parent e508eb4 commit a8a8dca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/src/routes/conversation/ChatInput/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ const ChatInput = ({ conv }) => {
type: "reordered",
conv: { id: conv.id, last_message_at: new Date().toISOString() },
});
}
if (groupedConvs.Today && groupedConvs.Today[0]?.id !== conv.id) {
} else if (groupedConvs.Today && groupedConvs.Today[0]?.id !== conv.id) {
dispatchConv({
type: "reordered",
conv: { id: conv.id, last_message_at: new Date().toISOString() },
Expand Down

0 comments on commit a8a8dca

Please sign in to comment.