Fix channel member render

This commit is contained in:
Jiiks 2018-03-14 02:36:34 +02:00
parent 006a67ee01
commit ce9a4c6b3d
1 changed files with 3 additions and 3 deletions

View File

@ -301,9 +301,9 @@ export class ReactAutoPatcher {
this.ChannelMember.component = await ReactComponents.getComponent('ChannelMember');
this.ChannelMember.component.on('render', ({ component, retVal, p }) => {
const { user, isOwner } = component.props;
retVal.props['data-member-id'] = user.id;
if (user.id === DiscordApi.currentUser.id) retVal.props.className += ' bd-isCurrentUser';
if (isOwner) retVal.props.className += ' bd-isOwner';
retVal.props.children.props['data-member-id'] = user.id;
if (user.id === DiscordApi.currentUser.id) retVal.props.children.props.className += ' bd-isCurrentUser';
if (isOwner) retVal.props.children.props.className += ' bd-isOwner';
});
}