]> cat aescling's git repositories - mastodon.git/commitdiff
Fix media modal link button (#18877)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 25 Aug 2022 02:30:53 +0000 (04:30 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:28:00 +0000 (00:28 -0400)
Fixes regression from #18697

app/javascript/mastodon/components/icon_button.js

index 81743a1dbe1ad7df6e87135944cb9e13eb14048b..47945c475f35d52a07dbc03a574e159ba7e2989d 100644 (file)
@@ -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>
       );