mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
chore(ytmusic): use optional chaining on duration text
This commit is contained in:
@@ -73,7 +73,7 @@ class MusicResponsiveListItem {
|
||||
const duration_text =
|
||||
this.#flex_columns[1].title.runs?.find(
|
||||
(run) => /^\d+$/.test(run.text.replace(/:/g, '')))?.text ||
|
||||
this.#fixed_columns[0].title.text;
|
||||
this.#fixed_columns?.[0]?.title?.text;
|
||||
|
||||
duration_text && (this.duration = {
|
||||
text: duration_text,
|
||||
|
||||
Reference in New Issue
Block a user