summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>2023-03-07 15:59:51 -0500
committerChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>2023-03-07 15:59:51 -0500
commita781cf37347e97c469eb098e95c9a80482aac1b9 (patch)
tree3f07a3fafb29061d75d21a5e814728c0b553a3cb /src
parent60b7c8015c9ae77664d0b0680a81cfcc979d5a03 (diff)
downloadinvidious-a781cf37347e97c469eb098e95c9a80482aac1b9.tar.gz
invidious-a781cf37347e97c469eb098e95c9a80482aac1b9.tar.bz2
invidious-a781cf37347e97c469eb098e95c9a80482aac1b9.zip
readd try as bool for isSponsor key
Diffstat (limited to 'src')
-rw-r--r--src/invidious/comments.cr3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr
index 56622dec..b15d63d4 100644
--- a/src/invidious/comments.cr
+++ b/src/invidious/comments.cr
@@ -334,7 +334,8 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
elsif child["verified"]?.try &.as_bool
author_name += "&nbsp;<i class=\"icon ion ion-md-checkmark\"></i>"
end
- if child["isSponsor"].as_bool
+
+ if child["isSponsor"]?.try &.as_bool
sponsor_icon = String.build do |str|
str << %(<img alt="" )
str << %(src="/ggpht) << URI.parse(child["sponsorIconUrl"].as_s).request_target << "\" "