Skip to content

Commit

Permalink
fix(Channel): type mismatch in subscribe_button prop
Browse files Browse the repository at this point in the history
The `subscribe_button` property can also be of type `Button`.
  • Loading branch information
LuanRT authored Mar 16, 2023
1 parent e21542c commit 573c864
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/parser/classes/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Author from './misc/Author.js';
import NavigationEndpoint from './NavigationEndpoint.js';

import SubscribeButton from './SubscribeButton.js';
import Button from './Button.js';

import { YTNode } from '../helpers.js';

Expand Down Expand Up @@ -36,9 +37,9 @@ class Channel extends YTNode {
this.long_byline = new Text(data.longBylineText);
this.short_byline = new Text(data.shortBylineText);
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
this.subscribe_button = Parser.parseItem(data.subscribeButton, SubscribeButton);
this.subscribe_button = Parser.parseItem(data.subscribeButton, [SubscribeButton, Button]);
this.description_snippet = new Text(data.descriptionSnippet);
}
}

export default Channel;
export default Channel;

0 comments on commit 573c864

Please sign in to comment.