diff --git a/client/components/shared/ArrayInput.tsx b/client/components/shared/ArrayInput.tsx index 517865c7..a10592b6 100644 --- a/client/components/shared/ArrayInput.tsx +++ b/client/components/shared/ArrayInput.tsx @@ -8,14 +8,14 @@ import styles from './ArrayInput.module.scss'; type Props = { label: string; - value: string[]; + value?: string[]; className?: string; onChange: (event: any) => void; errors?: FieldError | FieldError[]; }; const ArrayInput: React.FC = ({ value, label, onChange, errors, className }) => { - const [items, setItems] = useState(value); + const [items, setItems] = useState(value || []); const onAdd = () => setItems([...items, '']); diff --git a/client/modals/builder/sections/SkillModal.tsx b/client/modals/builder/sections/SkillModal.tsx index 278aa8fe..4758791c 100644 --- a/client/modals/builder/sections/SkillModal.tsx +++ b/client/modals/builder/sections/SkillModal.tsx @@ -159,7 +159,7 @@ const SkillModal: React.FC = () => { render={({ field, fieldState }) => (