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

This commit is contained in:
Udit Takkar
2024-05-24 02:20:50 +00:00
committed by GitHub
parent 37c02572de
commit ffe6a46e66
@@ -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);