Skip to content

Commit

Permalink
Fix null active channel case (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-xmr authored Feb 18, 2022
1 parent 56f8d8b commit 178dec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/component/headerProfileMenuButton/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ type HeaderMenuButtonProps = {

export default function HeaderProfileMenuButton(props: HeaderMenuButtonProps) {
const { myChannelClaimIds, activeChannelClaim, authenticated, email, signOut } = props;
const pendingChannelFetch = myChannelClaimIds === undefined;

const activeChannelUrl = activeChannelClaim && activeChannelClaim.permanent_url;
// activeChannel will be: undefined = fetching, null = nothing, or { channel claim }
const noActiveChannel = activeChannelUrl === null;
const pendingChannelFetch = !noActiveChannel && myChannelClaimIds === undefined;

return (
<div className="header__buttons">
Expand Down

0 comments on commit 178dec7

Please sign in to comment.