fix if click name in QT can't show post owner's profile(3)

This commit is contained in:
YoheiZuho 2022-05-01 16:58:21 +09:00
parent 5b95560d24
commit dfb6657713

View File

@ -30,12 +30,13 @@ class QuoteIndicator extends ImmutablePureComponent {
}
handleAccountClick = (e) => {
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) {
const id = e.currentTarget.getAttribute('data-id');
e.preventDefault();
this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
this.context.router.history.push(`/accounts/${id}`);
}
}
render () {
const { status, intl } = this.props;