mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
fix(Search): check if WatchCardHeroVideo is null before casting
Related #243
This commit is contained in:
@@ -40,8 +40,8 @@ class Search extends Feed {
|
||||
|
||||
this.watch_card = {
|
||||
header: universal_watch_card?.header.item() || null,
|
||||
call_to_action: universal_watch_card?.call_to_action.item().as(WatchCardHeroVideo) || null,
|
||||
sections: universal_watch_card?.sections.array().filterType(WatchCardSectionSequence) || []
|
||||
call_to_action: universal_watch_card?.call_to_action?.item()?.as(WatchCardHeroVideo) || null,
|
||||
sections: universal_watch_card?.sections?.array()?.filterType(WatchCardSectionSequence) || []
|
||||
};
|
||||
|
||||
this.refinement_cards = {
|
||||
|
||||
Reference in New Issue
Block a user