Skip to content

Commit 4514c46

Browse files
committed
fix: message clear editing state order
1 parent 9950151 commit 4514c46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

package/src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,15 +625,15 @@ export const MessageInputProvider = ({
625625
} else {
626626
messageComposer.clear();
627627
}
628+
// Even though we edit, but we eventually send the message as a regular message, so we need to clear the editing state.
629+
if (editedMessage) {
630+
clearEditingState();
631+
}
628632
await value.sendMessage({
629633
localMessage,
630634
message,
631635
options: sendOptions,
632636
});
633-
// Even though we edit, but we eventually send the message as a regular message, so we need to clear the editing state.
634-
if (editedMessage) {
635-
clearEditingState();
636-
}
637637
} catch (error) {
638638
throw new Error('Error while sending message');
639639
}

0 commit comments

Comments
 (0)