From f6f2476d315c56f1bc86c5bafc3c22a4c6077dcc Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:27:33 +0530 Subject: [PATCH] fix recursive state updates --- src/app/organisms/room/RoomInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/organisms/room/RoomInput.tsx b/src/app/organisms/room/RoomInput.tsx index 81c29b030..35f0580e0 100644 --- a/src/app/organisms/room/RoomInput.tsx +++ b/src/app/organisms/room/RoomInput.tsx @@ -187,7 +187,7 @@ export const RoomInput = forwardRef( const parsedDraft = JSON.parse(JSON.stringify(editor.children)); setMsgDraft(parsedDraft); } else { - roomIdToMsgDraftAtomFamily.remove(roomId); + setMsgDraft([]); } resetEditor(editor); resetEditorHistory(editor);