]> source.dussan.org Git - sonarqube.git/commitdiff
do not display avatar for "not assigned"
authorStas Vilchik <vilchiks@gmail.com>
Fri, 12 May 2017 08:51:51 +0000 (10:51 +0200)
committerStas Vilchik <stas-vilchik@users.noreply.github.com>
Mon, 15 May 2017 07:30:50 +0000 (09:30 +0200)
server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.js

index 25c1f31a5e807d1a4f0574c13e8e9b383eabf63f..9a4243e65ad59c726b6df35b7213bd7a6a7a9dab 100644 (file)
@@ -141,16 +141,17 @@ export default class SetAssigneePopup extends React.PureComponent {
             onSelect={this.props.onSelect}>
             {this.state.users.map(user => (
               <SelectListItem key={user.login} item={user.login}>
-                <Avatar
-                  className="spacer-right"
-                  email={user.email}
-                  hash={user.avatar}
-                  name={user.name}
-                  size={16}
-                />
+                {!!user.login &&
+                  <Avatar
+                    className="spacer-right"
+                    email={user.email}
+                    hash={user.avatar}
+                    name={user.name}
+                    size={16}
+                  />}
                 <span
                   className="vertical-middle"
-                  style={{ marginLeft: !user.avatar && !user.email ? 24 : undefined }}>
+                  style={{ marginLeft: !user.login ? 24 : undefined }}>
                   {user.name}
                 </span>
               </SelectListItem>