From 5ef4b3e63fd5a5539e606a1e7c99f6d3c79f6d11 Mon Sep 17 00:00:00 2001 From: Ben Loe Date: Tue, 30 Apr 2024 19:55:19 -0400 Subject: [PATCH] add files to strict null checks --- src/components/form/makeFieldAnnotationsForValue.ts | 4 ++-- src/tsconfig.strictNullChecks.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/form/makeFieldAnnotationsForValue.ts b/src/components/form/makeFieldAnnotationsForValue.ts index 8eacca55ed..5dbcdd3916 100644 --- a/src/components/form/makeFieldAnnotationsForValue.ts +++ b/src/components/form/makeFieldAnnotationsForValue.ts @@ -17,7 +17,7 @@ import { type AnalysisAnnotation } from "@/analysis/analysisTypes"; import { type FieldAnnotation } from "@/components/form/FieldAnnotation"; -import { isEmpty, isEqual } from "lodash"; +import { isEqual } from "lodash"; import { makeFieldActionForAnnotationAction } from "@/components/form/makeFieldActionForAnnotationAction"; import { type FormikContextType } from "formik"; @@ -50,7 +50,7 @@ export function makeFieldAnnotationsForValue( message, type, }; - if (!isEmpty(actions)) { + if (actions && actions.length > 0) { fieldAnnotation.actions = actions.map((action) => makeFieldActionForAnnotationAction(action, formik), ); diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json index 155c995ab9..be75db4e73 100644 --- a/src/tsconfig.strictNullChecks.json +++ b/src/tsconfig.strictNullChecks.json @@ -4,6 +4,8 @@ "strictNullChecks": true }, "files": [ + "./components/form/makeFieldActionForAnnotationAction.ts", + "./components/form/makeFieldAnnotationsForValue.ts", "../end-to-end-tests/auth.setup.ts", "../end-to-end-tests/env.ts", "../end-to-end-tests/fixtures/envSetup.ts",