Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaMartirosyan committed Jan 14, 2024
1 parent fac548e commit bd7b325
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export const JsonValuePresentorComponent: React.FC<JsonValuePresentorProps> = ({
);
} else {
const handleBlur = (e: React.FocusEvent<HTMLInputElement>): void => {
formik.setFieldTouched(fieldInfo.fieldName as string, true, false);
formik?.setFieldTouched(fieldInfo.fieldName as string, true, false);

let formikValue: unknown = undefined;

Expand Down Expand Up @@ -244,7 +244,7 @@ export const JsonValuePresentorComponent: React.FC<JsonValuePresentorProps> = ({
}

formikValue = JSON.parse(jsonValue) as unknown;
formik.setFieldValue(fieldInfo.fieldName as string, formikValue);
formik?.setFieldValue(fieldInfo.fieldName as string, formikValue);

removeStatusErrors();
} catch (err) {
Expand All @@ -263,7 +263,7 @@ export const JsonValuePresentorComponent: React.FC<JsonValuePresentorProps> = ({
),
});

formik.setStatus({
formik?.setStatus({
errors: {
...currentErrors,
[fieldInfo.fieldName as string]: Array.from(
Expand Down

0 comments on commit bd7b325

Please sign in to comment.