diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 912580853..af59b28e5 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -185,16 +185,12 @@ class Status extends ImmutablePureComponent { this.handleAccountClick(e, false); } - handleAccountClick = (e, proper = true) => { - if (e && (e.button !== 0 || e.ctrlKey || e.metaKey)) { - return; - } - - if (e) { + handleAccountClick = (e) => { + 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/${id}`); } - - this._openProfile(proper); } handleQuoteClick = () => {