feat: run nested async workflows (#9119)
This commit is contained in:
committed by
GitHub
parent
0bcdcccbe2
commit
ef8dc4087e
@@ -11,11 +11,11 @@ import {
|
||||
ProductVariantWorkflowEvents,
|
||||
} from "@medusajs/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createHook,
|
||||
createWorkflow,
|
||||
transform,
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import { emitEventStep } from "../../common"
|
||||
import { createLinksWorkflow } from "../../common/workflows/create-links"
|
||||
@@ -97,7 +97,7 @@ const buildLinksToCreate = (data: {
|
||||
const linksToCreate: LinkDefinition[] = []
|
||||
|
||||
validateVariantsDuplicateInventoryItemIds(
|
||||
data.createdVariants.map((variant, index) => {
|
||||
(data.createdVariants ?? []).map((variant, index) => {
|
||||
const variantInput = data.input.product_variants[index]
|
||||
const inventoryItems = variantInput.inventory_items || []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user