Skip to content

Commit

Permalink
fix(HashtagFeed): resolve type casting issue so tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Aug 13, 2023
1 parent b6b8e72 commit f467c51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/parser/youtube/HashtagFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import type Actions from '../../core/Actions.js';
import type { ApiResponse } from '../../core/Actions.js';
import type ChipCloudChip from '../classes/ChipCloudChip.js';
import type { IBrowseResponse } from '../index.js';
import { PageHeader } from '../nodes.js';

export default class HashtagFeed extends FilterableFeed<IBrowseResponse> {
header?: HashtagHeader;
header?: HashtagHeader | PageHeader;
contents: RichGrid;

constructor(actions: Actions, response: IBrowseResponse | ApiResponse) {
Expand All @@ -25,7 +26,7 @@ export default class HashtagFeed extends FilterableFeed<IBrowseResponse> {
throw new InnertubeError('Content tab has no content', tab);

if (this.page.header) {
this.header = this.page.header.item().as(HashtagHeader);
this.header = this.page.header.item().as(HashtagHeader, PageHeader);
}

this.contents = tab.content.as(RichGrid);
Expand Down

0 comments on commit f467c51

Please sign in to comment.