Skip to content

Commit

Permalink
add files to strict null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Loe committed Apr 30, 2024
1 parent fce9d45 commit 5ef4b3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/form/makeFieldAnnotationsForValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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),
);
Expand Down
2 changes: 2 additions & 0 deletions src/tsconfig.strictNullChecks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5ef4b3e

Please sign in to comment.