버그 픽스
This commit is contained in:
@@ -50,12 +50,10 @@
|
|||||||
|
|
||||||
audioFiles.forEach(audioFile => {
|
audioFiles.forEach(audioFile => {
|
||||||
if (transcripts.length < 2) {
|
if (transcripts.length < 2) {
|
||||||
const matchingJson = jsonFiles.find(jsonFile =>
|
const matchingJson = jsonFiles.length > 0 ? jsonFiles[0].name : 'No JSON provided';
|
||||||
jsonFile.name.replace('.json', '') === audioFile.name.replace('.mp3', '')
|
|
||||||
);
|
|
||||||
transcripts.push({
|
transcripts.push({
|
||||||
audio: audioFile.name,
|
audio: audioFile.name,
|
||||||
url: matchingJson ? matchingJson.name : 'No JSON provided'
|
url: matchingJson
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user