Skip to content

Commit 942d739

Browse files
KomediruzeckiDavy-c
authored andcommitted
Fix closed input null ref set
Change to created date of first comment instead of last comment date
1 parent dd88cc4 commit 942d739

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/cloud/components/Comments/CommentInput.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,14 @@ function CommentInput({
9494
try {
9595
setWorking(true)
9696
await onSubmit(fromNode(inputRef.current).trim())
97-
inputRef.current.innerHTML = ''
97+
if (inputRef.current != null) {
98+
inputRef.current.innerHTML = ''
99+
}
98100
} finally {
99101
setWorking(false)
100-
inputRef.current.focus()
102+
if (inputRef.current != null) {
103+
inputRef.current.focus()
104+
}
101105
}
102106
}, [onSubmit])
103107

src/cloud/components/Comments/ThreadItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function ThreadItem({
117117
<div className={'thread__comment__line'}>
118118
<span>{thread.contributors[0].displayName}</span>
119119
<span className='thread__comment__line__date'>
120-
{formatDate(thread.lastCommentTime)}
120+
{formatDate(threadComments[0].createdAt)}
121121
</span>
122122
{editing ? (
123123
<CommentInput

0 commit comments

Comments
 (0)