Skip to content

Commit

Permalink
Merge pull request #17865 from martenson/config-type
Browse files Browse the repository at this point in the history
[24.0] wait for config to load with user prefs options
  • Loading branch information
mvdbeek authored Mar 29, 2024
2 parents 2bba32d + aa00cb8 commit 91b93eb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions client/src/components/User/UserPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 91b93eb

Please sign in to comment.