From 67103be738759edde22c3afc63884e80266fb206 Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Fri, 12 Jun 2020 00:46:04 +1200 Subject: [PATCH] Fixed linting error for using this.get() in octane syntax no issue - Switched to getter as this.get() is not available in native classes --- ghost/admin/app/components/gh-member-settings-form.js | 2 +- ghost/admin/app/services/members-utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ghost/admin/app/components/gh-member-settings-form.js b/ghost/admin/app/components/gh-member-settings-form.js index da06797832..33e1b45835 100644 --- a/ghost/admin/app/components/gh-member-settings-form.js +++ b/ghost/admin/app/components/gh-member-settings-form.js @@ -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; diff --git a/ghost/admin/app/services/members-utils.js b/ghost/admin/app/services/members-utils.js index c83dfc1ae7..9100fd6df4 100644 --- a/ghost/admin/app/services/members-utils.js +++ b/ghost/admin/app/services/members-utils.js @@ -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; }