fix(ExpandableVideoDescriptionBody): Parse attributed description

This commit is contained in:
Luan
2024-11-09 16:20:55 -03:00
parent b83a32f6a6
commit 360580ea6e

View File

@@ -8,15 +8,14 @@ export default class ExpandableVideoDescriptionBody extends YTNode {
show_more_text: Text;
show_less_text: Text;
attributed_description_body_text?: string;
attributed_description_body_text?: Text;
constructor(data: RawNode) {
super();
this.show_more_text = new Text(data.showMoreText);
this.show_less_text = new Text(data.showLessText);
if (Reflect.has(data, 'attributedDescriptionBodyText')) {
this.attributed_description_body_text = data.attributedDescriptionBodyText?.content;
this.attributed_description_body_text = Text.fromAttributed(data.attributedDescriptionBodyText);
}
}
}