diff --git a/packages/block-library/src/avatar/hooks.js b/packages/block-library/src/avatar/hooks.js index 383c78dbfa3eb5..1f84b5c107682b 100644 --- a/packages/block-library/src/avatar/hooks.js +++ b/packages/block-library/src/avatar/hooks.js @@ -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 {