diff --git a/src/parser/classes/CardCollection.ts b/src/parser/classes/CardCollection.ts index 78f5b380..fdbe22d4 100644 --- a/src/parser/classes/CardCollection.ts +++ b/src/parser/classes/CardCollection.ts @@ -11,7 +11,7 @@ class CardCollection extends YTNode { constructor(data: any) { super(); - this.cards = Parser.parse(data.cards); + this.cards = Parser.parseArray(data.cards); this.header = new Text(data.headerText); this.allow_teaser_dismiss = data.allowTeaserDismiss; } diff --git a/src/parser/classes/ChipCloud.ts b/src/parser/classes/ChipCloud.ts index 11e53ccf..bb555e2a 100644 --- a/src/parser/classes/ChipCloud.ts +++ b/src/parser/classes/ChipCloud.ts @@ -1,7 +1,8 @@ import Parser from '../index'; +import Button from './Button'; +import ChipCloudChip from './ChipCloudChip'; import { YTNode } from '../helpers'; -import ChipCloudChip from './ChipCloudChip'; class ChipCloud extends YTNode { static type = 'ChipCloud'; @@ -15,8 +16,8 @@ class ChipCloud extends YTNode { super(); // TODO: check this assumption that chipcloudchip is always returned this.chips = Parser.parseArray(data.chips, ChipCloudChip); - this.next_button = Parser.parse(data.nextButton); - this.previous_button = Parser.parse(data.previousButton); + this.next_button = Parser.parseItem