about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-08-25 04:30:53 +0200
committerGitHub <noreply@github.com>2022-08-25 04:30:53 +0200
commitba745ca99a4ce4b953e11776827aabb68d621e79 (patch)
tree0407e9fb28d3ae3d261c9aeb56ae56038f19b199
parent19f2f35b33e4dacc43df2335ae89ec6af8bb8cb0 (diff)
Fix media modal link button (#18877)
Fixes regression from #18697
-rw-r--r--app/javascript/mastodon/components/icon_button.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js
index 81743a1db..47945c475 100644
--- a/app/javascript/mastodon/components/icon_button.js
+++ b/app/javascript/mastodon/components/icon_button.js
@@ -131,17 +131,9 @@ export default class IconButton extends React.PureComponent {
       </React.Fragment>
     );
 
-    if (href) {
-      return (
-        <a
-          href={href}
-          aria-label={title}
-          title={title}
-          target='_blank'
-          rel='noopener noreferrer'
-          className={classes}
-          style={style}
-        >
+    if (href && !this.prop) {
+      contents = (
+        <a href={href} target='_blank' rel='noopener noreferrer'>
           {contents}
         </a>
       );