1
0
mirror of https://github.com/flarum/core.git synced 2025-06-04 05:35:55 +02:00

fix: Post--by-actor not showing when comparing user instances as discussion.user() is not loaded (#3170)

This commit is contained in:
Sami Mazouz 2021-11-19 18:41:13 +01:00 committed by GitHub
parent 7242b18ff0
commit d82ae27231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ export default class Post extends Component {
/** /**
* Get the post's classes. * Get the post's classes.
* *
* @param string classes * @param existing string
* @returns {string[]} * @returns {string[]}
*/ */
classes(existing) { classes(existing) {
@ -137,7 +137,7 @@ export default class Post extends Component {
classes.push('Post--by-actor'); classes.push('Post--by-actor');
} }
if (user && user === discussion.user()) { if (user && user.id() === discussion.attribute('startUserId')) {
classes.push('Post--by-start-user'); classes.push('Post--by-start-user');
} }