mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
DEV: Fix lazy_load_categories for uncategorized topic lists (#24028)
This commit is contained in:
parent
75441e063a
commit
e7afd18155
|
@ -77,7 +77,8 @@ class TopicList
|
|||
end
|
||||
|
||||
def categories
|
||||
@categories ||= topics.map { |t| [t.category, t.category.parent_category] }.uniq.flatten.compact
|
||||
@categories ||=
|
||||
topics.map { |t| [t.category, t.category&.parent_category] }.uniq.flatten.compact
|
||||
end
|
||||
|
||||
def load_topics
|
||||
|
|
Loading…
Reference in New Issue
Block a user