Fixed linting error for using this.get() in octane syntax

no issue

- Switched to getter as this.get() is not available in native classes
This commit is contained in:
Nazar Gargol 2020-06-12 00:46:04 +12:00
parent fa9fc64b53
commit 67103be738
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ export default Component.extend({
hasMultipleSubscriptions: gt('member.stripe', 1),
canShowStripeInfo: computed('member.isNew', 'settings.membersSubscriptionSettings', function () {
let stripeEnabled = this.membersUtils.isStripeEnabled();
let stripeEnabled = this.membersUtils.isStripeEnabled;
if (this.member.get('isNew') || !stripeEnabled) {
return false;

View File

@ -4,8 +4,8 @@ import {inject as service} from '@ember/service';
export default class MembersUtilsService extends Service {
@service settings;
isStripeEnabled() {
let membersSubscriptionSettings = this.settings.parseSubscriptionSettings(this.get('settings.membersSubscriptionSettings'));
get isStripeEnabled() {
let membersSubscriptionSettings = this.settings.parseSubscriptionSettings(this.settings.get('membersSubscriptionSettings'));
let stripeEnabled = membersSubscriptionSettings && !!(membersSubscriptionSettings.paymentProcessors[0].config.secret_token) && !!(membersSubscriptionSettings.paymentProcessors[0].config.public_token);
return stripeEnabled;
}