mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed 'null' portal button text
no refs. - fixing portal button displaying 'null' if the portal button text input field is empty
This commit is contained in:
parent
9fe752d86d
commit
bc779bb3e7
1 changed files with 2 additions and 1 deletions
|
@ -82,6 +82,7 @@ export default ModalComponent.extend({
|
||||||
const baseUrl = this.config.get('blogUrl');
|
const baseUrl = this.config.get('blogUrl');
|
||||||
const portalBase = '/#/portal/preview';
|
const portalBase = '/#/portal/preview';
|
||||||
const settingsParam = new URLSearchParams();
|
const settingsParam = new URLSearchParams();
|
||||||
|
const signupButtonText = this.settings.get('portalButtonSignupText') || '';
|
||||||
settingsParam.append('button', this.settings.get('portalButton'));
|
settingsParam.append('button', this.settings.get('portalButton'));
|
||||||
settingsParam.append('name', this.settings.get('portalName'));
|
settingsParam.append('name', this.settings.get('portalName'));
|
||||||
settingsParam.append('isFree', this.isFreeChecked);
|
settingsParam.append('isFree', this.isFreeChecked);
|
||||||
|
@ -91,7 +92,7 @@ export default ModalComponent.extend({
|
||||||
if (this.buttonIcon) {
|
if (this.buttonIcon) {
|
||||||
settingsParam.append('buttonIcon', encodeURIComponent(this.buttonIcon));
|
settingsParam.append('buttonIcon', encodeURIComponent(this.buttonIcon));
|
||||||
}
|
}
|
||||||
settingsParam.append('signupButtonText', encodeURIComponent(this.settings.get('portalButtonSignupText')));
|
settingsParam.append('signupButtonText', encodeURIComponent(signupButtonText));
|
||||||
if (this.settings.get('accentColor') === '' || this.settings.get('accentColor')) {
|
if (this.settings.get('accentColor') === '' || this.settings.get('accentColor')) {
|
||||||
settingsParam.append('accentColor', encodeURIComponent(`${this.settings.get('accentColor')}`));
|
settingsParam.append('accentColor', encodeURIComponent(`${this.settings.get('accentColor')}`));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue