need to check if currentUser exists (#13814)

need to check if currentUser exists (#13814)

diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js
index 866eb76..a184f91 100644
--- a/app/assets/javascripts/discourse/app/widgets/post.js
+++ b/app/assets/javascripts/discourse/app/widgets/post.js
@@ -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) {

GitHub sha: 5ebae8a64df84ddb0365a4710ffdb48f6c5921e7

This commit appears in #13814 which was approved by eviltrout. It was merged by awesomerobot.