From 8bd33a00e4c36a8b63b79b10fac6ff2366abaccf Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Sun, 5 Jan 2025 16:39:01 +0200 Subject: [PATCH] refactor: unneeded null protection --- .../src/components/EditableTypography/EditableTypography.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/EditableTypography/EditableTypography.tsx b/packages/core/src/components/EditableTypography/EditableTypography.tsx index d5b7772acc..bf47064193 100644 --- a/packages/core/src/components/EditableTypography/EditableTypography.tsx +++ b/packages/core/src/components/EditableTypography/EditableTypography.tsx @@ -181,7 +181,7 @@ const EditableTypography: VibeComponent = function resizeTextarea() { if (inputRef.current) { // Temporarily set the height to "auto" to accurately measure the scroll height of the content inside the textarea. - inputRef?.current?.style.setProperty("--input-height", "auto"); + inputRef.current?.style.setProperty("--input-height", "auto"); requestAnimationFrame(() => { const textarea = inputRef.current as HTMLTextAreaElement; @@ -195,7 +195,7 @@ const EditableTypography: VibeComponent = textarea.scrollHeight + textareaBorderBoxSizing.current, textareaLineHeight.current + textareaBorderBoxSizing.current ); - inputRef?.current?.style.setProperty("--input-height", `${height}px`); + inputRef.current?.style.setProperty("--input-height", `${height}px`); }); } }