Skip to content

Commit

Permalink
removed unnecessary '&&' check (#41779)
Browse files Browse the repository at this point in the history
  • Loading branch information
hz-tyfoon authored Jun 18, 2022
1 parent 8ed90b4 commit 0b7378a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/block-library/src/avatar/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,12 @@ export function useUserAvatar( { userId, postId, postType } ) {
},
[ postType, postId, userId ]
);

const avatarUrls =
authorDetails && authorDetails?.avatar_urls
? Object.values( authorDetails.avatar_urls )
: null;
const sizes =
authorDetails && authorDetails?.avatar_urls
? Object.keys( authorDetails.avatar_urls )
: null;
const avatarUrls = authorDetails?.avatar_urls
? Object.values( authorDetails.avatar_urls )
: null;
const sizes = authorDetails?.avatar_urls
? Object.keys( authorDetails.avatar_urls )
: null;
const { minSize, maxSize } = getAvatarSizes( sizes );
const defaultAvatar = useDefaultAvatar();
return {
Expand Down

0 comments on commit 0b7378a

Please sign in to comment.