Don't apply background color if there is none

This commit is contained in:
Toby Zerner 2015-07-18 10:55:56 +09:30
parent b7264e8a71
commit 9db026de95

View File

@ -26,10 +26,11 @@ export default class UserCard extends Component {
view() {
const user = this.props.user;
const controls = UserControls.controls(user, this).toArray();
const color = user.color();
return (
<div className={'UserCard ' + (this.props.className || '')}
style={{backgroundColor: user.color()}}>
style={color ? {backgroundColor: color} : ''}>
<div className="darkenBackground">
<div className="container">