need to check if currentUser exists (#13814)

This commit is contained in:
Kris 2021-07-21 12:26:28 -04:00 committed by GitHub
parent da81cfe317
commit 5ebae8a64d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -755,7 +755,7 @@ export default createWidget("post", {
if (attrs.topicOwner) {
classNames.push("topic-owner");
}
if (attrs.user_id === this.currentUser.id) {
if (this.currentUser && attrs.user_id === this.currentUser.id) {
classNames.push("current-user-post");
}
if (attrs.groupModerator) {