mirror of
https://github.com/flarum/core.git
synced 2025-02-24 03:05:12 +01:00
check class string before concat
This commit is contained in:
parent
b3f8379a15
commit
aac194616a
@ -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(),
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user