1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 23:01:17 +02:00

Merge pull request #1456 from sijad/prevent-undefined

check class string before concat
This commit is contained in:
Franz Liedke
2018-06-27 21:10:40 +02:00
committed by GitHub
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 post = this.props.post;
const attrs = super.attrs(); const attrs = super.attrs();
attrs.className += ' '+classList({ attrs.className = (attrs.className || '') + ' ' + classList({
'CommentPost': true, 'CommentPost': true,
'Post--hidden': post.isHidden(), 'Post--hidden': post.isHidden(),
'Post--edited': post.isEdited(), 'Post--edited': post.isEdited(),

View File

@@ -18,7 +18,7 @@ export default class EventPost extends Post {
attrs() { attrs() {
const attrs = super.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; return attrs;
} }