Fix #4508: Specific tag not showing a wiki.
Fix the wiki excerpt not appearing when searching for a tag that doesn't exist in the tag list. This could happen if someone created a wiki for a tag that has never been used on a post.
This commit is contained in:
@@ -24,9 +24,8 @@ module PostSets
|
||||
end
|
||||
|
||||
def wiki_page
|
||||
return nil unless tag.present? && tag.wiki_page.present?
|
||||
return nil unless !tag.wiki_page.is_deleted?
|
||||
tag.wiki_page
|
||||
return nil unless normalized_query.has_single_tag?
|
||||
@wiki_page ||= WikiPage.undeleted.find_by(title: normalized_query.tags.first.name)
|
||||
end
|
||||
|
||||
def tag
|
||||
|
||||
Reference in New Issue
Block a user