fix: lint fix

This commit is contained in:
2026-03-15 17:53:17 +01:00
parent 242b2acb68
commit c81125fc53
2 changed files with 6 additions and 3 deletions
+1
View File
@@ -26,6 +26,7 @@ dev: node_modules ## run dev version of static site
lint: node_modules ## lint code
@$(BUN) run lint
@$(BUN) run type-check
fix: node_modules ## fix and reformat code
@$(BUN) run format
+5 -3
View File
@@ -19,9 +19,11 @@ const canStop = computed<boolean>(() => ready.value && playing.value);
function onChangeFile(event: Event): void {
ready.value = false;
file.value = URL.createObjectURL(
(event.target as HTMLInputElement).files![0] as File,
);
const eventFiles = (event.target as HTMLInputElement).files;
if (!eventFiles?.length || !eventFiles[0]) {
return;
}
file.value = URL.createObjectURL(eventFiles[0]);
audio.value = new Audio(file.value);
audio.value.addEventListener("loadeddata", onAudioLoadedData);
audio.value.addEventListener("ended", onAudioEnded);