Skip to content

Commit 33f225b

Browse files
committed
fix installments order (sort instead reverse)
1 parent 5b13360 commit 33f225b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/easycredit-checkout/easycredit-checkout.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ export class EasycreditCheckout {
7474
return
7575
}
7676

77-
this.installments = installment.plans.reverse()
77+
let plans = installment.plans
78+
plans.sort((a,b) => parseFloat(a.installment) - parseFloat(b.installment))
79+
80+
this.installments = plans
7881
this.example = installment.example
7982
}).catch(e => {
8083
console.error(e)

0 commit comments

Comments
 (0)