Merge pull request #220 from medusajs/hotfix/contentful-variants
fix: ensures that product variants are updated in contentful when they are part of a product update
This commit is contained in:
@@ -449,9 +449,14 @@ class ContentfulService extends BaseService {
|
|||||||
"options",
|
"options",
|
||||||
]
|
]
|
||||||
|
|
||||||
const found = variant.fields.find((f) => updateFields.includes(f))
|
// Update came directly from product variant service so only act on a couple
|
||||||
if (!found) {
|
// of fields. When the update comes from the product we want to ensure
|
||||||
return
|
// references are set up correctly so we run through everything.
|
||||||
|
if (variant.fields) {
|
||||||
|
const found = variant.fields.find((f) => updateFields.includes(f))
|
||||||
|
if (!found) {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user