Skip to content

Commit

Permalink
fix: Use name if preferredUsername is empty (#148)
Browse files Browse the repository at this point in the history
* Use name if preferredUsername is empty

flyteorg/flyte#657

* check for empty string
  • Loading branch information
EngHabu authored Feb 24, 2021
1 parent 96f7689 commit 0cdd983
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Navigation/UserInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ export const UserInformation: React.FC<{}> = () => {
{profile.value == null ? (
<LoginLink />
) : (
profile.value.preferredUsername
)}
profile.value.preferredUsername == null || profile.value.preferredUsername == "" ? (
profile.value.name
) : (
profile.value.preferredUsername
)
)}
</div>
</WaitForData>
);
Expand Down

0 comments on commit 0cdd983

Please sign in to comment.