Skip to content

Commit

Permalink
fix(Feed): Do not throw when multiple continuations are present
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Oct 2, 2023
1 parent 987f506 commit 8e372d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/mixins/Feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,8 @@ export default class Feed<T extends IParsedResponse = IParsedResponse> {
*/
async getContinuationData(): Promise<T | undefined> {
if (this.#continuation) {
if (this.#continuation.length > 1)
throw new InnertubeError('There are too many continuations, you\'ll need to find the correct one yourself in this.page');
if (this.#continuation.length === 0)
throw new InnertubeError('There are no continuations');
throw new InnertubeError('There are no continuations.');

const response = await this.#continuation[0].endpoint.call<T>(this.#actions, { parse: true });

Expand Down

0 comments on commit 8e372d5

Please sign in to comment.