Skip to content

Commit

Permalink
fix: crash create product (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum authored Jun 21, 2023
1 parent 7af26b1 commit bb73501
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/product/ProductImages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function ProductImages({ onChangeOneSetOfImages }: Props) {
};
}) || []
);
}, [values.productVariants.variants]);
}, [values.productVariants?.variants]);
const TabsContent = useCallback(({ children }: { children: ReactNode }) => {
return <div>{children}</div>;
}, []);
Expand Down
2 changes: 1 addition & 1 deletion src/components/product/ProductInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const AddAttributesContainer = ({
const { values } = useCreateForm();

const elements: ElementType[] = useMemo(
() => values?.productInformation?.attributes,
() => values?.productInformation?.attributes || [],
[values?.productInformation?.attributes]
);

Expand Down

0 comments on commit bb73501

Please sign in to comment.