From aa00cb8aa859ba53ef0006f80c71cebef2db4457 Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Thu, 28 Mar 2024 14:02:50 -0700 Subject: [PATCH] config is not defined yet on load --- client/src/components/User/UserPreferences.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/client/src/components/User/UserPreferences.vue b/client/src/components/User/UserPreferences.vue index c0eac8d89b61..0eb8a0c4d5e2 100644 --- a/client/src/components/User/UserPreferences.vue +++ b/client/src/components/User/UserPreferences.vue @@ -204,12 +204,20 @@ export default { return Object.fromEntries(enabledPreferences); }, hasLogout() { - const Galaxy = getGalaxyInstance(); - return !!Galaxy.session_csrf_token && !this.config.single_user; + if (this.isConfigLoaded) { + const Galaxy = getGalaxyInstance(); + return !!Galaxy.session_csrf_token && !this.config.single_user; + } else { + return false; + } }, hasThemes() { - const themes = Object.keys(this.config.themes); - return themes?.length > 1 ?? false; + if (this.isConfigLoaded) { + const themes = Object.keys(this.config.themes); + return themes?.length > 1 ?? false; + } else { + return false; + } }, userPermissionsUrl() { return withPrefix("/user/permissions");