mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:54:16 +08:00
FIX: Ensure currentUser exists before getting ID
Otherwise this would trigger a JS error for anonymous users.
This commit is contained in:
parent
480e2ec523
commit
776840c810
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user