FIX: prevents rendering topic-category if empty (#9720)

This commit is contained in:
Joffrey JAFFEUX
2020-05-11 16:45:28 +02:00
committed by GitHub
parent a9cf680f76
commit addf9d62f8
2 changed files with 6 additions and 8 deletions

View File

@ -1012,6 +1012,8 @@ class TopicsController < ApplicationController
respond_to do |format|
format.html do
@tags = SiteSetting.tagging_enabled ? @topic_view.topic.tags : []
@breadcrumbs = helpers.categories_breadcrumb(@topic_view.topic) || []
@description_meta = @topic_view.topic.excerpt.present? ? @topic_view.topic.excerpt : @topic_view.summary
store_preloaded("topic_#{@topic_view.topic.id}", MultiJson.dump(topic_view_serializer))
render :show