Skip to content

Commit

Permalink
refactor: revert removal of toString
Browse files Browse the repository at this point in the history
  • Loading branch information
domw30 committed Oct 13, 2023
1 parent b1236df commit 666961a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/messages/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ export function* deleteMessage(action) {
const existingMessageIds = yield select(rawMessagesSelector(channelId));
const fullMessages = yield select((state) => denormalize(existingMessageIds, state));

const messageIdsToDelete = fullMessages.filter((m) => m.rootMessageId === messageId).map((m) => m.id);
const messageIdsToDelete = fullMessages.filter((m) => m.rootMessageId === messageId.toString()).map((m) => m.id); // toString() because message ids are currently a number

messageIdsToDelete.unshift(messageId);

yield put(
Expand Down

0 comments on commit 666961a

Please sign in to comment.