1
0
mirror of synced 2026-08-05 22:56:55 +00:00

FIX: If only one plan, automatically select it

This commit is contained in:
Justin DiRose
2020-07-28 11:08:21 -05:00
parent 9e66588038
commit 11d9b2e011
@@ -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);
}
}
},
},
});