diff --git a/assets/javascripts/discourse/components/payment-options.js.es6 b/assets/javascripts/discourse/components/payment-options.js.es6 index c19f52b..13acc30 100644 --- a/assets/javascripts/discourse/components/payment-options.js.es6 +++ b/assets/javascripts/discourse/components/payment-options.js.es6 @@ -1,9 +1,15 @@ import Component from "@ember/component"; export default Component.extend({ + init() { + this._super(...arguments); + if (this.plans.length === 1) { + this.set("selectedPlan", this.plans[0].id); + } + }, actions: { clickPlan(plan) { this.set("selectedPlan", plan.id); - } - } + }, + }, });