From 9da2f0775f8a6bdf0a86b9cd416f9532d561729e Mon Sep 17 00:00:00 2001 From: haiwu <54203997+Chinoholo0807@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:27:46 +0800 Subject: [PATCH] fix: fix bug in Pricing (#2255) --- object/product.go | 3 +++ web/src/PlanListPage.js | 1 + 2 files changed, 4 insertions(+) diff --git a/object/product.go b/object/product.go index 17ad6801..1953747a 100644 --- a/object/product.go +++ b/object/product.go @@ -283,6 +283,9 @@ func CreateProductForPlan(plan *Plan) *Product { Providers: plan.PaymentProviders, State: "Published", } + if product.Providers == nil { + product.Providers = []string{} + } return product } diff --git a/web/src/PlanListPage.js b/web/src/PlanListPage.js index e4a035ba..7d253955 100644 --- a/web/src/PlanListPage.js +++ b/web/src/PlanListPage.js @@ -36,6 +36,7 @@ class PlanListPage extends BaseListPage { pricePerYear: 100, currency: "USD", isEnabled: true, + paymentProviders: [], role: "", options: [], };