FIX: Ensure currentUser exists before getting ID

Otherwise this would trigger a JS error for anonymous users.
This commit is contained in:
Penar Musaraj 2019-12-16 14:53:31 -05:00
parent 480e2ec523
commit 776840c810

View File

@ -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