mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
Fix optimistic comment draft clearing
This commit is contained in:
parent
5e65bb2b92
commit
a7cfbc98f3
3 changed files with 48 additions and 3 deletions
6
ui/src/lib/comment-submit-draft.ts
Normal file
6
ui/src/lib/comment-submit-draft.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export function restoreSubmittedCommentDraft(params: {
|
||||
currentBody: string;
|
||||
submittedBody: string;
|
||||
}) {
|
||||
return params.currentBody.trim() ? params.currentBody : params.submittedBody;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue