From 88a6ee907efdca85f4b920adeaecdbd098721d0f Mon Sep 17 00:00:00 2001 From: LuanRT Date: Fri, 29 Jul 2022 06:58:49 -0300 Subject: [PATCH] chore: lint --- src/parser/classes/MusicDetailHeader.js | 2 +- src/parser/classes/MusicResponsiveListItem.ts | 2 +- src/parser/youtube/History.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/classes/MusicDetailHeader.js b/src/parser/classes/MusicDetailHeader.js index 8d674866..1820c619 100644 --- a/src/parser/classes/MusicDetailHeader.js +++ b/src/parser/classes/MusicDetailHeader.js @@ -18,7 +18,7 @@ class MusicDetailHeader extends YTNode { this.thumbnails = Thumbnail.fromResponse(data.thumbnail.croppedSquareThumbnailRenderer.thumbnail); this.badges = Parser.parse(data.subtitleBadges); - const author = this.subtitle.runs.find((run) => run.endpoint.browse?.id.startsWith('UC')); + const author = this.subtitle.runs.find((run) => run.endpoint?.browse?.id.startsWith('UC')); if (author) { this.author = { diff --git a/src/parser/classes/MusicResponsiveListItem.ts b/src/parser/classes/MusicResponsiveListItem.ts index 52a831d5..105aa525 100644 --- a/src/parser/classes/MusicResponsiveListItem.ts +++ b/src/parser/classes/MusicResponsiveListItem.ts @@ -72,7 +72,7 @@ class MusicResponsiveListItem extends YTNode { playlist_set_video_id: data?.playlistItemData?.playlistSetVideoId || null }; - this.endpoint = data.navigationEndpoint ? new NavigationEndpoint(data.navigationEndpoint) : undefined; + this.endpoint = data.navigationEndpoint ? new NavigationEndpoint(data.navigationEndpoint) : null; switch (this.endpoint?.browse?.page_type) { case 'MUSIC_PAGE_TYPE_ALBUM': diff --git a/src/parser/youtube/History.ts b/src/parser/youtube/History.ts index e639a6cf..2774793a 100644 --- a/src/parser/youtube/History.ts +++ b/src/parser/youtube/History.ts @@ -8,7 +8,7 @@ import BrowseFeedActions from '../classes/BrowseFeedActions'; class History extends Feed { sections; feed_actions; - + constructor(actions: Actions, data: any, already_parsed = false) { super(actions, data, already_parsed); this.sections = this.memo.get('ItemSection') as ItemSection[];