mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 13:07:22 +00:00
fix navbar crash (#22212)
This commit is contained in:
parent
be2ed5ff62
commit
20107efd48
@ -511,7 +511,8 @@ const NavBar = () => {
|
||||
<Button
|
||||
className="flex-center gap-2 p-x-xs font-medium"
|
||||
type="text">
|
||||
{upperCase(language.split('-')[0])} <DropDownIcon width={12} />
|
||||
{language ? upperCase(language.split('-')[0]) : ''}{' '}
|
||||
<DropDownIcon width={12} />
|
||||
</Button>
|
||||
</Dropdown>
|
||||
<Dropdown
|
||||
|
||||
@ -98,7 +98,9 @@ export const useCurrentUserPreferences = () => {
|
||||
}
|
||||
|
||||
return {
|
||||
preferences: preferences[currentUser.name] || defaultPreferences,
|
||||
preferences: preferences[currentUser.name]
|
||||
? { ...defaultPreferences, ...preferences[currentUser.name] }
|
||||
: defaultPreferences,
|
||||
setPreference: (newPreferences: Partial<UserPreferences>) =>
|
||||
setUserPreference(currentUser.name, newPreferences),
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user