aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-02-08 16:45:33 +0200
committerGravatar ks129 <[email protected]>2021-02-08 16:45:33 +0200
commitc9d423d99a0eb4be2b4cc808ae11e42fc2cd04de (patch)
tree9c5f50a4f5f2bc528549b3fbbcf17b2e35e1a8c5
parentImprove and simplify checkboxes gathering (diff)
Simplify if check
-rw-r--r--src/pages/FormPage.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx
index b8518c0..0023db4 100644
--- a/src/pages/FormPage.tsx
+++ b/src/pages/FormPage.tsx
@@ -221,7 +221,7 @@ function FormPage(): JSX.Element {
if (invalidFieldIds.length) {
const firstErrored = questions[invalidFieldIds[0]];
- if (firstErrored !== undefined) {
+ if (firstErrored) {
firstErrored.props.scroll_ref.current.scrollIntoView({ behavior: "smooth", block: "center" });
}
return;