MOBILE-3857 overview: Fix filter selector not displayed

main
Dani Palou 2021-09-13 17:51:32 +02:00
parent a143fbc61b
commit 3d07369fd0
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 = [];
}