mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-20 04:51:16 +00:00
refactor!: fix inconsistent use of SuperParsedResult
This commit is contained in:
@@ -10,7 +10,7 @@ class Author {
|
||||
this.#nav_text = new NavigatableText(item);
|
||||
|
||||
this.id =
|
||||
this.#nav_text.runs?.[0].endpoint.browse?.id ||
|
||||
this.#nav_text.runs?.[0].endpoint?.browse?.id ||
|
||||
this.#nav_text.endpoint?.browse?.id || 'N/A';
|
||||
|
||||
this.name = this.#nav_text.text || 'N/A';
|
||||
@@ -21,8 +21,8 @@ class Author {
|
||||
this.is_verified_artist = this.badges?.some((badge) => badge.style == 'BADGE_STYLE_TYPE_VERIFIED_ARTIST') || null;
|
||||
|
||||
this.url =
|
||||
this.#nav_text.runs?.[0].endpoint.browse &&
|
||||
`${Constants.URLS.YT_BASE}${this.#nav_text.runs[0].endpoint.browse?.base_url || `/u/${this.#nav_text.runs[0].endpoint.browse?.id}`}` ||
|
||||
this.#nav_text.runs?.[0].endpoint?.browse &&
|
||||
`${Constants.URLS.YT_BASE}${this.#nav_text.runs[0].endpoint?.browse?.base_url || `/u/${this.#nav_text.runs[0].endpoint?.browse?.id}`}` ||
|
||||
`${Constants.URLS.YT_BASE}${this.#nav_text.endpoint?.browse?.base_url || `/u/${this.#nav_text.endpoint?.browse?.id}`}` ||
|
||||
null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user