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

fix #718
This commit is contained in:
Amruth Pillai
2022-03-17 13:58:49 +01:00
parent b3ff7805cd
commit a02b85b4bb
3 changed files with 4 additions and 3 deletions

View File

@ -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, '']);