From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Thu, 19 Oct 2023 06:43:37 +0000 (+1100) Subject: fix recursive state updates (#1458) X-Git-Tag: v3.0.0~10 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=ed3d14b131ee39f4c530681df3de42ae93e34c0c;p=rainny.git fix recursive state updates (#1458) --- 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);