mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 00:56:23 +00:00
refactor: improve Search parser (#247)
* refactor: improve Search parser * chore: lint
This commit is contained in:
@@ -3,7 +3,7 @@ import Text from './misc/Text';
|
||||
import NavigationEndpoint from './NavigationEndpoint';
|
||||
import { YTNode } from '../helpers';
|
||||
|
||||
class VerticalWatchCardList extends YTNode {
|
||||
export default class VerticalWatchCardList extends YTNode {
|
||||
static type = 'VerticalWatchCardList';
|
||||
|
||||
items;
|
||||
@@ -13,11 +13,9 @@ class VerticalWatchCardList extends YTNode {
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.items = Parser.parse(data.items);
|
||||
this.items = Parser.parseArray(data.items);
|
||||
this.contents = this.items; // XXX: alias for consistency
|
||||
this.view_all_text = new Text(data.viewAllText);
|
||||
this.view_all_endpoint = new NavigationEndpoint(data.viewAllEndpoint);
|
||||
}
|
||||
}
|
||||
|
||||
export default VerticalWatchCardList;
|
||||
}
|
||||
Reference in New Issue
Block a user