{"action":"created","issue":{"url":"https://api.github.com/repos/mui-org/material-ui/issues/17876","repository_url":"https://api.github.com/repos/mui-org/material-ui","labels_url":"https://api.github.com/repos/mui-org/material-ui/issues/17876/labels{/name}","comments_url":"https://api.github.com/repos/mui-org/material-ui/issues/17876/comments","events_url":"https://api.github.com/repos/mui-org/material-ui/issues/17876/events","html_url":"https://github.com/mui-org/material-ui/issues/17876","id":506678328,"node_id":"MDU6SXNzdWU1MDY2NzgzMjg=","number":17876,"title":"Avatar shows children and image","user":{"login":"ajdaniel","id":867941,"node_id":"MDQ6VXNlcjg2Nzk0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/867941?v=4","gravatar_id":"","url":"https://api.github.com/users/ajdaniel","html_url":"https://github.com/ajdaniel","followers_url":"https://api.github.com/users/ajdaniel/followers","following_url":"https://api.github.com/users/ajdaniel/following{/other_user}","gists_url":"https://api.github.com/users/ajdaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/ajdaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajdaniel/subscriptions","organizations_url":"https://api.github.com/users/ajdaniel/orgs","repos_url":"https://api.github.com/users/ajdaniel/repos","events_url":"https://api.github.com/users/ajdaniel/events{/privacy}","received_events_url":"https://api.github.com/users/ajdaniel/received_events","type":"User","site_admin":false},"labels":[{"id":460198048,"node_id":"MDU6TGFiZWw0NjAxOTgwNDg=","url":"https://api.github.com/repos/mui-org/material-ui/labels/component:%20Avatar","name":"component: Avatar","color":"ffffff","default":false},{"id":299360691,"node_id":"MDU6TGFiZWwyOTkzNjA2OTE=","url":"https://api.github.com/repos/mui-org/material-ui/labels/discussion","name":"discussion","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-10-14T14:09:52Z","updated_at":"2019-10-15T10:05:59Z","closed_at":null,"author_association":"NONE","body":"- [x] The issue is present in the latest release.\r\n- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.\r\n\r\n## Current Behavior 😯\r\n\r\nWhen I pass in children and a `src` prop to the `Avatar` component, both are rendered. This is a change in behaviour that was not expected, and was caused by #17693. \r\n\r\n![image](https://user-images.githubusercontent.com/867941/66757592-62b35080-ee94-11e9-828b-c16f4caeae78.png)\r\n\r\n\r\n## Expected Behavior 🤔\r\n\r\n![image](https://user-images.githubusercontent.com/867941/66757552-54fdcb00-ee94-11e9-9d8f-3417b783f384.png)\r\n\r\n\r\n## Steps to Reproduce 🕹\r\n\r\nProvide children and a `src` to the Avatar component, like so:\r\n\r\n```jsx\r\n<Avatar src={person.avatar} className={classes.avatarPerson}>\r\n  {person.name.substr(0, 1)}\r\n</Avatar>\r\n```\r\n\r\n## Context 🔦\r\n\r\nWe use this to display user profile images, but fallback to the user name initials if the image doesn't exist.\r\n\r\n## Your Environment 🌎\r\n\r\n\r\n| Tech        | Version |\r\n| ----------- | ------- |\r\n| Material-UI | v4.2.1  |\r\n"},"comment":{"url":"https://api.github.com/repos/mui-org/material-ui/issues/comments/542138966","html_url":"https://github.com/mui-org/material-ui/issues/17876#issuecomment-542138966","issue_url":"https://api.github.com/repos/mui-org/material-ui/issues/17876","id":542138966,"node_id":"MDEyOklzc3VlQ29tbWVudDU0MjEzODk2Ng==","user":{"login":"oliviertassinari","id":3165635,"node_id":"MDQ6VXNlcjMxNjU2MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/3165635?v=4","gravatar_id":"","url":"https://api.github.com/users/oliviertassinari","html_url":"https://github.com/oliviertassinari","followers_url":"https://api.github.com/users/oliviertassinari/followers","following_url":"https://api.github.com/users/oliviertassinari/following{/other_user}","gists_url":"https://api.github.com/users/oliviertassinari/gists{/gist_id}","starred_url":"https://api.github.com/users/oliviertassinari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliviertassinari/subscriptions","organizations_url":"https://api.github.com/users/oliviertassinari/orgs","repos_url":"https://api.github.com/users/oliviertassinari/repos","events_url":"https://api.github.com/users/oliviertassinari/events{/privacy}","received_events_url":"https://api.github.com/users/oliviertassinari/received_events","type":"User","site_admin":false},"created_at":"2019-10-15T10:05:59Z","updated_at":"2019-10-15T10:05:59Z","author_association":"MEMBER","body":"We didn't design the fallback mechanism. I think that it was a happy coincidence. At least, I'm not aware it's documented nor that we had a test for it. "}}
{"actor":{"display_login":"oliviertassinari"}}