버그 픽스

This commit is contained in:
Chan
2025-01-09 15:18:27 +09:00
parent f98166d4c9
commit ab9e7bf220

View File

@@ -50,12 +50,10 @@
audioFiles.forEach(audioFile => {
if (transcripts.length < 2) {
const matchingJson = jsonFiles.find(jsonFile =>
jsonFile.name.replace('.json', '') === audioFile.name.replace('.mp3', '')
);
const matchingJson = jsonFiles.length > 0 ? jsonFiles[0].name : 'No JSON provided';
transcripts.push({
audio: audioFile.name,
url: matchingJson ? matchingJson.name : 'No JSON provided'
url: matchingJson
});
}
});