fix: lint fix
This commit is contained in:
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user