From dfb6657713b49b1cd6e951fc0d22e58327d501b9 Mon Sep 17 00:00:00 2001 From: YoheiZuho Date: Sun, 1 May 2022 16:58:21 +0900 Subject: [PATCH] fix if click name in QT can't show post owner's profile(3) --- .../features/compose/components/quote_indicator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/quote_indicator.js b/app/javascript/mastodon/features/compose/components/quote_indicator.js index 1d4c6a341..83578ee65 100644 --- a/app/javascript/mastodon/features/compose/components/quote_indicator.js +++ b/app/javascript/mastodon/features/compose/components/quote_indicator.js @@ -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;