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:
Sebastian Rindom
2023-09-22 11:02:28 +02:00
committed by GitHub
parent dfa5d041c9
commit c1b8f089e3
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@medusajs/medusa": patch
"medusa-payment-stripe": patch
---
fix(medusa-payment-stripe): adds missing undefined check

View File

@@ -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)