readd try as bool for isSponsor key
This commit is contained in:
parent
60b7c8015c
commit
a781cf3734
1 changed files with 2 additions and 1 deletions
|
@ -334,7 +334,8 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
|
||||||
elsif child["verified"]?.try &.as_bool
|
elsif child["verified"]?.try &.as_bool
|
||||||
author_name += " <i class=\"icon ion ion-md-checkmark\"></i>"
|
author_name += " <i class=\"icon ion ion-md-checkmark\"></i>"
|
||||||
end
|
end
|
||||||
if child["isSponsor"].as_bool
|
|
||||||
|
if child["isSponsor"]?.try &.as_bool
|
||||||
sponsor_icon = String.build do |str|
|
sponsor_icon = String.build do |str|
|
||||||
str << %(<img alt="" )
|
str << %(<img alt="" )
|
||||||
str << %(src="/ggpht) << URI.parse(child["sponsorIconUrl"].as_s).request_target << "\" "
|
str << %(src="/ggpht) << URI.parse(child["sponsorIconUrl"].as_s).request_target << "\" "
|
||||||
|
|
Loading…
Reference in a new issue