mirror of
https://github.com/discourse/discourse.git
synced 2025-06-25 01:30:17 +08:00
FIX: Ensure currentUser exists before getting ID
Otherwise this would trigger a JS error for anonymous users.
This commit is contained in:
@ -111,6 +111,7 @@ export default createWidget("topic-admin-menu", {
|
||||
|
||||
if (
|
||||
this.siteSettings.allow_featured_topic_on_user_profiles &&
|
||||
this.currentUser &&
|
||||
topic.user_id === this.currentUser.get("id") &&
|
||||
!topic.isPrivateMessage &&
|
||||
!topic.category.read_restricted
|
||||
|
Reference in New Issue
Block a user