From cf30a2a046050d1305e9e9a670c4350f2c6d58bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Poul=20Kjeldager=20S=C3=B8rensen?= Date: Wed, 6 Mar 2024 03:44:24 +0100 Subject: [PATCH] fix: null check on input --- .../src/components/question/input-types/text/TextInput.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/components/question/input-types/text/TextInput.tsx b/packages/core/src/components/question/input-types/text/TextInput.tsx index 55705fd..cf7b0f5 100644 --- a/packages/core/src/components/question/input-types/text/TextInput.tsx +++ b/packages/core/src/components/question/input-types/text/TextInput.tsx @@ -17,6 +17,9 @@ export const BaseInputComponent = ({ questionModel, className, style, type }: { const resize = () => { const input = ref.current; + if (!input) + return; + const oldvalue = input.value; if (!oldvalue || oldvalue === '')