Skip to content

Commit

Permalink
chore: return empty array if no transcription found (#15185)
Browse files Browse the repository at this point in the history
  • Loading branch information
Udit-takkar authored May 24, 2024
1 parent 37c0257 commit ffe6a46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/app-store/dailyvideo/lib/VideoApiAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => {
const roomId = res.id;
const allTranscripts = await fetcher(`/transcript?roomId=${roomId}`).then(getTranscripts.parse);

const allTranscriptsIds = allTranscripts.data.map((transcript) => transcript.transcriptId);
if (!allTranscripts.data.length) return [];

const allTranscriptsIds = allTranscripts.data.map((transcript) => transcript.transcriptId);
const allTranscriptsAccessLink = await processTranscriptsInBatches(allTranscriptsIds);

const accessLinks = await Promise.all(allTranscriptsAccessLink);

return Promise.resolve(accessLinks);
Expand Down

0 comments on commit ffe6a46

Please sign in to comment.