fix(dashboard): Prevent product metadata form from throwing error (#10312)
Resolves CMRC-755
This commit is contained in:
committed by
GitHub
parent
1b55f477a6
commit
2edc2fe19b
5
.changeset/chilly-walls-hope.md
Normal file
5
.changeset/chilly-walls-hope.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/dashboard": patch
|
||||
---
|
||||
|
||||
fix(dashboard): Prevent product metadata form from throwing an error
|
||||
@@ -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 (
|
||||
<MetadataForm
|
||||
metadata={product.metadata}
|
||||
metadata={product?.metadata}
|
||||
hook={mutateAsync}
|
||||
isPending={isPending}
|
||||
isMutating={isMutating}
|
||||
|
||||
Reference in New Issue
Block a user