Skip to content

Commit b24a89f

Browse files
authored
Merge pull request #2903 from iv-org/SamantazFox-patch-1
comments: don't error out when video has no comments
2 parents 85ba04b + 7112f35 commit b24a89f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/invidious/comments.cr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b
7878
when "RELOAD_CONTINUATION_SLOT_HEADER"
7979
header = item["reloadContinuationItemsCommand"]["continuationItems"][0]
8080
when "RELOAD_CONTINUATION_SLOT_BODY"
81-
contents = item["reloadContinuationItemsCommand"]["continuationItems"]
81+
# continuationItems is nil when video has no comments
82+
contents = item["reloadContinuationItemsCommand"]["continuationItems"]?
8283
end
8384
elsif item["appendContinuationItemsAction"]?
8485
contents = item["appendContinuationItemsAction"]["continuationItems"]

0 commit comments

Comments
 (0)