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 RindomandOli Juhl authored and GitHub committed 2023-09-22 11:02:28 +02:00
1 parent dfa5d041c9
commit c1b8f089e3
2 files changed
+7 -1

No files matched your search

+6
View 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)