mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-07 01:22:49 -05:00
Use short syntax for comment entry-point detection
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
d67d032aa2
commit
6e39521dfd
@ -300,7 +300,7 @@ module Invidious::Videos::Parser
|
|||||||
|
|
||||||
# When comments are enabled there should be a comments-entry-point section in the primary results
|
# When comments are enabled there should be a comments-entry-point section in the primary results
|
||||||
if 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
|
if section
|
||||||
comments_enabled = true
|
comments_enabled = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user