From 6e39521dfd89b27baa13bda32618aa5ef5f9e1c5 Mon Sep 17 00:00:00 2001 From: syeopite <70992037+syeopite@users.noreply.github.com> Date: Sun, 17 Sep 2023 18:30:06 +0000 Subject: [PATCH] Use short syntax for comment entry-point detection Co-authored-by: Samantaz Fox --- src/invidious/videos/parser.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index f39f2a362..2f0952c89 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -300,7 +300,7 @@ module Invidious::Videos::Parser # When comments are enabled there should be a comments-entry-point section in the primary results if primary_results - section = primary_results.as_a.find { |s| s.dig?("itemSectionRenderer", "sectionIdentifier") == "comments-entry-point" } + section = primary_results.as_a.find(&.dig?("itemSectionRenderer", "sectionIdentifier").== "comments-entry-point") if section comments_enabled = true