chore: return empty array if no transcription found (#15185)

This commit is contained in:
Udit Takkar authored and GitHub committed 2024-05-24 02:20:50 +00:00
1 parent 37c02572de
commit ffe6a46e66
1 file changed
+2 -2
@@ -260,10 +260,10 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => {
const roomId = res.id;
const allTranscripts = await fetcher(`/transcript?roomId=${roomId}`).then(getTranscripts.parse);
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);