fix: incorrect node parser implementations (#428)

These were causing some issues in v5.2.0.
This commit is contained in:
LuanRT
2023-07-03 21:58:00 -03:00
committed by GitHub
parent 83cbfd631b
commit 222dfce6bb
13 changed files with 131 additions and 78 deletions

View File

@@ -7,14 +7,11 @@ export default class CarouselLockup extends YTNode {
static type = 'CarouselLockup';
info_rows: ObservedArray<InfoRow>;
video_lockup?: CompactVideo;
video_lockup?: CompactVideo | null;
constructor(data: RawNode) {
super();
this.info_rows = Parser.parseArray(data.infoRows, InfoRow);
const video_lockup = Parser.parseItem(data.videoLockup, CompactVideo);
if (video_lockup != null) {
this.video_lockup = video_lockup;
}
this.video_lockup = Parser.parseItem(data.videoLockup, CompactVideo);
}
}