]> cat aescling's git repositories - mastodon.git/commitdiff
Fix "undefined" in className (#3939)
authorPFM <info@eyesight.jp>
Sun, 25 Jun 2017 14:02:56 +0000 (23:02 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 25 Jun 2017 14:02:56 +0000 (16:02 +0200)
app/javascript/mastodon/components/permalink.js

index 5d3e4738d04ba48c00c35a4adfd31b2d7367ed13..0b7d0a65ad9df83aad7a34a31f8cab7684592c34 100644 (file)
@@ -25,7 +25,7 @@ export default class Permalink extends React.PureComponent {
     const { href, children, className, ...other } = this.props;
 
     return (
-      <a href={href} onClick={this.handleClick} {...other} className={'permalink ' + className}>
+      <a href={href} onClick={this.handleClick} {...other} className={`permalink${className ? ' ' + className : ''}`}>
         {children}
       </a>
     );