[CST-15593] fix orejime startup error

this was happening because of hidden apps not being removed from category arrays.
This commit is contained in:
Andrea Barbasso
2024-09-16 11:44:08 +02:00
parent a9da80caae
commit 58c5d742b7

View File

@@ -382,9 +382,13 @@ export class BrowserOrejimeService extends OrejimeService {
} }
/** /**
* remove the Google Analytics from the apps * remove apps that should be hidden from the configuration
*/ */
private filterConfigApps(appsToHide: string[]) { private filterConfigApps(appsToHide: string[]) {
this.orejimeConfig.categories.forEach((category) => {
category.apps = category.apps.filter(service => !appsToHide.some(name => name === service));
});
this.orejimeConfig.categories = this.orejimeConfig.categories.filter(category => category.apps.length > 0);
return this.orejimeConfig.apps.filter(service => !appsToHide.some(name => name === service.name)); return this.orejimeConfig.apps.filter(service => !appsToHide.some(name => name === service.name));
} }