check class string before concat

This commit is contained in:
Sajjad Hashemian 2018-06-12 17:58:01 +04:30
parent b3f8379a15
commit aac194616a
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ export default class CommentPost extends Post {
const post = this.props.post;
const attrs = super.attrs();
attrs.className += ' '+classList({
attrs.className = (attrs.className || '') + ' ' + classList({
'CommentPost': true,
'Post--hidden': post.isHidden(),
'Post--edited': post.isEdited(),

View File

@ -18,7 +18,7 @@ export default class EventPost extends Post {
attrs() {
const attrs = super.attrs();
attrs.className += ' EventPost ' + ucfirst(this.props.post.contentType()) + 'Post';
attrs.className = (attrs.className || '') + ' EventPost ' + ucfirst(this.props.post.contentType()) + 'Post';
return attrs;
}