diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx index b6bf52bbf29..ca0cd0801c7 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx @@ -137,7 +137,7 @@ const MultiAutocompleteSelectFieldComponent: React.FC { diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index b2ec653b165..c014d9c79de 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -185,7 +185,7 @@ export const ProductUpdatePage: React.FC = ({ ); const [selectedTaxType, setSelectedTaxType] = useStateFromProps( - product?.taxType.description, + product?.taxType?.description, ); const categories = getChoices(categoryChoiceList); diff --git a/src/products/utils/data.ts b/src/products/utils/data.ts index 745eee71eea..c8ff2e8c166 100644 --- a/src/products/utils/data.ts +++ b/src/products/utils/data.ts @@ -201,10 +201,10 @@ export function getProductUpdatePageFormData( return { category: maybe(() => product.category.id, ""), - changeTaxCode: !!product?.taxType.taxCode, - chargeTaxes: maybe(() => product.chargeTaxes, false), + changeTaxCode: !!product?.taxType?.taxCode, + chargeTaxes: maybe(() => product?.chargeTaxes, false), collections: maybe( - () => product.collections.map(collection => collection.id), + () => product?.collections?.map(collection => collection.id), [], ), isAvailable: !!product?.isAvailable, @@ -224,7 +224,7 @@ export function getProductUpdatePageFormData( "", ), slug: product?.slug || "", - taxCode: product?.taxType.taxCode, + taxCode: product?.taxType?.taxCode, trackInventory: !!variant?.trackInventory, weight: product?.weight?.value.toString() || "", isPreorder: !!variant?.preorder || false,