fix build

This commit is contained in:
Pavel Mineev
2021-01-12 13:39:26 -06:00
committed by Umputun
parent a144dd00e3
commit 3bd1bb1c89
@@ -108,12 +108,8 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
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<Record<string, string>>(LS_SAVED_COMMENT_VALUE);
let text = savedComments?.[props.id] ?? '';
if (props.value) {
text = props.value;