diff --git a/.changeset/chilly-walls-hope.md b/.changeset/chilly-walls-hope.md new file mode 100644 index 0000000000..f7d378227d --- /dev/null +++ b/.changeset/chilly-walls-hope.md @@ -0,0 +1,5 @@ +--- +"@medusajs/dashboard": patch +--- + +fix(dashboard): Prevent product metadata form from throwing an error diff --git a/packages/admin/dashboard/src/routes/products/product-metadata/product-metadata.tsx b/packages/admin/dashboard/src/routes/products/product-metadata/product-metadata.tsx index cd15d44ecd..553b2eb17f 100644 --- a/packages/admin/dashboard/src/routes/products/product-metadata/product-metadata.tsx +++ b/packages/admin/dashboard/src/routes/products/product-metadata/product-metadata.tsx @@ -7,7 +7,7 @@ export const ProductMetadata = () => { const { product, isPending, isError, error } = useProduct(id!) - const { mutateAsync, isPending: isMutating } = useUpdateProduct(product.id!) + const { mutateAsync, isPending: isMutating } = useUpdateProduct(product?.id!) if (isError) { throw error @@ -15,7 +15,7 @@ export const ProductMetadata = () => { return (