diff --git a/app/javascript/mastodon/features/compose/components/quote_indicator.js b/app/javascript/mastodon/features/compose/components/quote_indicator.js index 83578ee65..1d4c6a341 100644 --- a/app/javascript/mastodon/features/compose/components/quote_indicator.js +++ b/app/javascript/mastodon/features/compose/components/quote_indicator.js @@ -30,13 +30,12 @@ class QuoteIndicator extends ImmutablePureComponent { } handleAccountClick = (e) => { - if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) { - const id = e.currentTarget.getAttribute('data-id'); + if (e.button === 0 && !(e.ctrlKey || e.metaKey)) { e.preventDefault(); - this.context.router.history.push(`/accounts/${id}`); + this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`); } } - + render () { const { status, intl } = this.props; diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 1b9d1ee5b..9e60b8239 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -85,10 +85,10 @@ class DetailedStatus extends ImmutablePureComponent { }; handleAccountClick = (e) => { - if (e.button === 0 && !(e.ctrlKey || e.metaKey) && this.context.router) { + 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(`/@${this.props.status.getIn(['account', 'acct'])}`); + this.context.router.history.push(`/accounts/${id}`); } e.stopPropagation();