From ed3d14b131ee39f4c530681df3de42ae93e34c0c Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Thu, 19 Oct 2023 17:43:37 +1100 Subject: [PATCH] fix recursive state updates (#1458) --- 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 ae12afb..a1fa6c2 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);