diff --git a/frontend/app/components/comment-form/comment-form.tsx b/frontend/app/components/comment-form/comment-form.tsx index c3bc879f..487c94e2 100644 --- a/frontend/app/components/comment-form/comment-form.tsx +++ b/frontend/app/components/comment-form/comment-form.tsx @@ -108,12 +108,8 @@ export class CommentForm extends Component { textareaId = textareaId + 1; this.textareaId = `textarea_${textareaId}`; - const savedComments = getJsonItem(LS_SAVED_COMMENT_VALUE); - let text = ''; - - if (savedComments !== null && savedComments[props.id]) { - text = savedComments[props.id]; - } + const savedComments = getJsonItem>(LS_SAVED_COMMENT_VALUE); + let text = savedComments?.[props.id] ?? ''; if (props.value) { text = props.value;