From 137534f90126bd786742f9f90dddd2cffe8f0965 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 18 May 2022 23:36:50 +0200 Subject: [PATCH] Fix for #3096 --- src/invidious/comments.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 1f8de657f..1237db5d7 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -567,6 +567,10 @@ end def content_to_comment_html(content, video_id : String? = "") html_array = content.map do |run| + # Sometimes, there is an empty element. + # See: https://github.com/iv-org/invidious/issues/3096 + next if run.as_h.empty? + text = HTML.escape(run["text"].as_s) if run["navigationEndpoint"]?