diff --git a/ghost/admin/app/components/gh-members-lab-setting.js b/ghost/admin/app/components/gh-members-lab-setting.js index 51527a631f..2cfe43ce74 100644 --- a/ghost/admin/app/components/gh-members-lab-setting.js +++ b/ghost/admin/app/components/gh-members-lab-setting.js @@ -7,6 +7,12 @@ export default Component.extend({ config: service(), mediaQueries: service(), + blogDomain: computed('config.blogDomain', function () { + let domain = this.config.blogDomain || ''; + const host = domain.replace('https://', '').replace('http://', '').split('/'); + return (host && host[0]) || ''; + }), + subscriptionSettings: computed('settings.membersSubscriptionSettings', function () { let subscriptionSettings = this.parseSubscriptionSettings(this.get('settings.membersSubscriptionSettings')); let stripeProcessor = subscriptionSettings.paymentProcessors.find((proc) => { diff --git a/ghost/admin/app/templates/components/gh-members-lab-setting.hbs b/ghost/admin/app/templates/components/gh-members-lab-setting.hbs index 205ced9b51..7d07c2c26a 100644 --- a/ghost/admin/app/templates/components/gh-members-lab-setting.hbs +++ b/ghost/admin/app/templates/components/gh-members-lab-setting.hbs @@ -181,7 +181,7 @@ input=(action "setSubscriptionSettings" "fromAddress") class="w20" }} - @{{config.blogDomain}} + @{{blogDomain}}