fix(medusa-payment-stripe): adds missing undefined check (#5177)
* fix: adds undefined check * Create twelve-lamps-search.md --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
6
.changeset/twelve-lamps-search.md
Normal file
6
.changeset/twelve-lamps-search.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
"medusa-payment-stripe": patch
|
||||
---
|
||||
|
||||
fix(medusa-payment-stripe): adds missing undefined check
|
||||
@@ -198,7 +198,7 @@ async function capturePaymentIfNecessary({
|
||||
.retrieveByCartId(cartId)
|
||||
.catch(() => undefined)
|
||||
|
||||
if (order?.payment_status !== "captured") {
|
||||
if (order && order.payment_status !== "captured") {
|
||||
await orderService
|
||||
.withTransaction(transactionManager)
|
||||
.capturePayment(order.id)
|
||||
|
||||
Reference in New Issue
Block a user