Fixed check for empty portal button icon

no issue

- Members modal missed check for null portal button icon in initial state for dummy icons
This commit is contained in:
Rish 2020-07-08 20:53:29 +05:30
parent 9b196a6697
commit dc82014283

View File

@ -57,7 +57,9 @@ export default ModalComponent.extend({
settingsParam.append('isMonthly', this.isMonthlyChecked);
settingsParam.append('isYearly', this.isYearlyChecked);
settingsParam.append('page', this.page);
if (this.buttonIcon) {
settingsParam.append('buttonIcon', encodeURIComponent(this.buttonIcon));
}
settingsParam.append('signupButtonText', encodeURIComponent(this.signupButtonText));
if (this.settings.get('accentColor')) {
settingsParam.append('accentColor', encodeURIComponent(`${this.settings.get('accentColor')}`));
@ -107,7 +109,8 @@ export default ModalComponent.extend({
'https://raw.githubusercontent.com/leungwensen/svg-icon/master/dist/trimmed-svg/evil/user.svg'
];
this.iconExtensions = ICON_EXTENSIONS;
if (!this.settings.get('portalButtonIcon').includes('githubusercontent')) {
const portalButtonIcon = this.settings.get('portalButtonIcon') || '';
if (portalButtonIcon && !portalButtonIcon.includes('githubusercontent')) {
return this.set('customIcon', this.settings.get('portalButtonIcon'));
}
},