mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
fix: Music#Artistparse err if missing shelves (#155)
This commit is contained in:
@@ -20,8 +20,8 @@ class Artist {
|
||||
|
||||
this.header = this.page.header.item().as(MusicImmersiveHeader);
|
||||
|
||||
const music_shelf = this.#page.contents_memo.get('MusicShelf') as MusicShelf[];
|
||||
const music_carousel_shelf = this.#page.contents_memo.get('MusicCarouselShelf') as MusicCarouselShelf[];
|
||||
const music_shelf = this.#page.contents_memo.get('MusicShelf') as MusicShelf[] || [];
|
||||
const music_carousel_shelf = this.#page.contents_memo.get('MusicCarouselShelf') as MusicCarouselShelf[] || [];
|
||||
|
||||
this.sections = [ ...music_shelf, ...music_carousel_shelf ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user