chore(medusa): Little improvement in draft order creation (#3374)
**What** Only call line item service create once, instead of twice.
This commit is contained in:
1 parent
d0d11307d2
commit
84e4489683
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore(medusa): Little improvement in draft order creation
|
||||||
@@ -352,7 +352,7 @@ class DraftOrderService extends TransactionBaseService {
|
|||||||
cart_id: createdCart.id,
|
cart_id: createdCart.id,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
promises.push(lineItemServiceTx.create(toCreate))
|
itemsToCreate.push(...toCreate)
|
||||||
}
|
}
|
||||||
|
|
||||||
// custom line items can be added to a draft order
|
// custom line items can be added to a draft order
|
||||||
|
|||||||
Reference in new issue
Block a user