Skip to content

Commit

Permalink
fix: remove kotlin forEach call (#1505)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecruzan-stripe authored Sep 15, 2023
1 parent c8d593c commit f54fe81
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,8 @@ internal fun mapFromSetupIntentResult(setupIntent: SetupIntent): WritableMap {
map.putMap("lastSetupError", setupError)
}

setupIntent.paymentMethodTypes.forEach { code ->
val type: PaymentMethod.Type? = PaymentMethod.Type.values().find {
code == it.code
}
type?.let {
for (code in setupIntent.paymentMethodTypes) {
PaymentMethod.Type.fromCode(code)?.let {
paymentMethodTypes.pushString(mapPaymentMethodType(it))
}
}
Expand Down

0 comments on commit f54fe81

Please sign in to comment.