Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mukeshpanchal27 authored May 25, 2022
1 parent 480d05f commit 3ef4944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/avatar/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ export function useUserAvatar( { userId, postId, postType } ) {
},
[ postType, postId, userId ]
);
const avatarUrls = authorDetails
const avatarUrls = authorDetails && authorDetails.avatar_urls !== undefined
? Object.values( authorDetails.avatar_urls )
: null;
const sizes = authorDetails
const sizes = authorDetails && authorDetails.avatar_urls !== undefined
? Object.keys( authorDetails.avatar_urls )
: null;
const { minSize, maxSize } = getAvatarSizes( sizes );
Expand Down

0 comments on commit 3ef4944

Please sign in to comment.