From 3bd1bb1c89b7c4da1c2cc7b14ae125d05a69fe56 Mon Sep 17 00:00:00 2001 From: Pavel Mineev Date: Thu, 7 Jan 2021 00:31:11 +0300 Subject: [PATCH] fix build --- frontend/app/components/comment-form/comment-form.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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;