From ab9e7bf22032ec7ccad9e54a210ad553cbd4bc2d Mon Sep 17 00:00:00 2001 From: Chan Date: Thu, 9 Jan 2025 15:18:27 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=94=BD=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/demo/index.html b/demo/index.html index d6e2125..aaacbff 100644 --- a/demo/index.html +++ b/demo/index.html @@ -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 }); } });