From 573c8643aae16ec7b6be5b333619a5d8c91ca5c1 Mon Sep 17 00:00:00 2001 From: LuanRT Date: Thu, 16 Mar 2023 04:48:59 -0300 Subject: [PATCH] fix(Channel): type mismatch in `subscribe_button` prop The `subscribe_button` property can also be of type `Button`. --- src/parser/classes/Channel.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parser/classes/Channel.ts b/src/parser/classes/Channel.ts index af26e3fcd..460da0452 100644 --- a/src/parser/classes/Channel.ts +++ b/src/parser/classes/Channel.ts @@ -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; \ No newline at end of file +export default Channel;