Merge pull request #2945 from dpalou/MOBILE-3857

MOBILE-3857 overview: Fix filter selector not displayed
main
Noel De Martin 2021-09-14 09:16:51 +02:00 committed by GitHub
commit ecf10d1516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem
* @return Promise resolved when done.
*/
protected async fetchContent(): Promise<void> {
const config = this.block.configsRecord || {};
const config = this.block.configsRecord;
const showCategories = config?.displaycategories?.value == '1';
@ -300,7 +300,7 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem
false,
);
if (this.showFilters.custom == 'show') {
this.customFilter = CoreTextUtils.parseJSON(config?.customfieldsexport?.value, []);
this.customFilter = CoreTextUtils.parseJSON(config?.customfieldsexport?.value || '[]', []);
} else {
this.customFilter = [];
}