Add fix for channels with empty descriptions

This commit is contained in:
Omar Roth 2019-08-01 07:49:33 -05:00
parent f71d5c429d
commit c41beae99a
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2
1 changed files with 2 additions and 1 deletions

View File

@ -958,7 +958,8 @@ def get_about_info(ucid, locale)
banner = nil
end
description_html = about.xpath_node(%q(//div[contains(@class,"about-description")])).try &.to_s || ""
description_html = about.xpath_node(%q(//div[contains(@class,"about-description")])).try &.to_s ||
%(<div class="about-description branded-page-box-padding"><pre></pre></div>)
paid = about.xpath_node(%q(//meta[@itemprop="paid"])).not_nil!["content"] == "True"
is_family_friendly = about.xpath_node(%q(//meta[@itemprop="isFamilyFriendly"])).not_nil!["content"] == "True"