Skip to content

Commit

Permalink
fix: null data in twitter
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Sep 21, 2024
1 parent c1913c8 commit 380ca2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/routes/twitter/api/web-api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ export const paginationTweets = async (endpoint: string, userId: number | undefi
}
}

const entries1 = instructions.find((i) => i.type === 'TimelineAddToModule')?.moduleItems; // Media
const entries2 = instructions.find((i) => i.type === 'TimelineAddEntries').entries;
return entries1 || entries2;
const entries1 = instructions?.find((i) => i.type === 'TimelineAddToModule')?.moduleItems; // Media
const entries2 = instructions?.find((i) => i.type === 'TimelineAddEntries').entries;
return entries1 || entries2 || [];
};

export function gatherLegacyFromData(entries: any[], filterNested?: string[], userId?: number | string) {
Expand Down

0 comments on commit 380ca2f

Please sign in to comment.