From a02b85b4bb1c4a1499aacddeac7bc59bcb1f7adb Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Thu, 17 Mar 2022 13:58:49 +0100 Subject: [PATCH] fix(linkedin): fix skill modal crashing when importing from linkedin fix #718 --- client/components/shared/ArrayInput.tsx | 4 ++-- client/modals/builder/sections/SkillModal.tsx | 2 +- server/src/integrations/integrations.service.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) 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 }) => (