Preselect first found app if nothing specified

This commit is contained in:
Johannes Zellner
2023-03-29 20:09:59 +02:00
parent d4fd0db296
commit c8d11fa268
+2 -1
View File
@@ -233,9 +233,10 @@ export default {
this.apps = result.body ? result.body.apps.filter(a => !!a.manifest.addons.localstorage) : [];
}
const appId = this.$route.params.appId || 'e78a515c-2153-48a6-aa62-badd6a540d4e';
const appId = this.$route.params.appId;
this.activeApp = this.apps.find(a => a.id === appId);
if (!this.activeApp) this.activeApp = this.apps[0];
if (!this.activeApp) return console.error('Unable to find app', appId);
this.selectedAppId = this.activeApp.id;