mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
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:
parent
fa9fc64b53
commit
67103be738
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user