Use short syntax for comment entry-point detection

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
syeopite 2023-09-17 18:30:06 +00:00 committed by Fijxu
parent d67d032aa2
commit 6e39521dfd
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4

View File

@ -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