chore(ytmusic): use optional chaining on duration text

This commit is contained in:
LuanRT
2022-06-20 18:10:35 -03:00
parent 97d4cc1056
commit 36f02cdcdb

View File

@@ -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,