mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-30 09:55:18 +00:00
fix(Channel): type mismatch in subscribe_button prop
The `subscribe_button` property can also be of type `Button`.
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user