Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix(linkedin): fix skill modal crashing when importing from linkedin

Amruth Pillaia02b85b4bb1c
diff --git a/client/components/shared/ArrayInput.tsx b/client/components/shared/ArrayInput.tsx
index 517865c77..a10592b6f 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<Props> = ({ value, label, onChange, errors, className }) => {
- const [items, setItems] = useState<string[]>(value);
+ const [items, setItems] = useState<string[]>(value || []);
const onAdd = () => setItems([...items, '']);
diff --git a/client/modals/builder/sections/SkillModal.tsx b/client/modals/builder/sections/SkillModal.tsx
index 278aa8fed..4758791ce 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 }) => (
<ArrayInput
label={t('builder.common.form.keywords.label')}
- value={field.value as string[]}
+ value={field.value}
onChange={field.onChange}
errors={fieldState.error}
className="col-span-2"
diff --git a/server/src/integrations/integrations.service.ts b/server/src/integrations/integrations.service.ts
index f0918527d..f62f3c305 100644
--- a/server/src/integrations/integrations.service.ts
+++ b/server/src/integrations/integrations.service.ts
@@ -242,6 +242,7 @@ export class IntegrationsService {
name: get(skill, 'Name'),
level: 'Beginner',
levelNum: 5,
+ keywords: [],
} as Skill,
],
},