mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-21 18:45:03 +00:00
optional chaining
This commit is contained in:
parent
2d4b34a902
commit
6286b376fa
1 changed files with 3 additions and 1 deletions
|
|
@ -39,7 +39,9 @@ export function chunkThread(threadText: string): TweetChunks {
|
|||
const chunkedTweet = chunkText(parsedTweet.text, 1536);
|
||||
const metadata: Metadata = {
|
||||
tweetId: parsedTweet.id_str,
|
||||
tweetLinks: parsedTweet.entities.urls.map((url: any) => url.expanded_url),
|
||||
tweetLinks: parsedTweet.entities?.urls.map(
|
||||
(url: any) => url.expanded_url,
|
||||
),
|
||||
tweetVids:
|
||||
parsedTweet.extended_entities?.media
|
||||
.filter((media: any) => media.type === "video")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue