From 6745ca77757d88303cf8b15aafd2a75f43376afc Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Thu, 12 Aug 2021 19:57:22 +0200 Subject: [PATCH] fix comments using dig --- src/invidious/comments.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index bbdb5370..141a526d 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -570,7 +570,7 @@ def content_to_comment_html(content) else text = %(#{text}) end - elsif url = run["navigationEndpoint"]["commandMetadata"]?.try &.["webCommandMetadata"]["url"].as_s + elsif url = run.dig?("navigationEndpoint", "commandMetadata", "webCommandMetadata", "url").try &.as_s text = %(#{text}) end end