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
|
lint: node_modules ## lint code
|
||||||
@$(BUN) run lint
|
@$(BUN) run lint
|
||||||
|
@$(BUN) run type-check
|
||||||
|
|
||||||
fix: node_modules ## fix and reformat code
|
fix: node_modules ## fix and reformat code
|
||||||
@$(BUN) run format
|
@$(BUN) run format
|
||||||
|
|||||||
+5
-3
@@ -19,9 +19,11 @@ const canStop = computed<boolean>(() => ready.value && playing.value);
|
|||||||
|
|
||||||
function onChangeFile(event: Event): void {
|
function onChangeFile(event: Event): void {
|
||||||
ready.value = false;
|
ready.value = false;
|
||||||
file.value = URL.createObjectURL(
|
const eventFiles = (event.target as HTMLInputElement).files;
|
||||||
(event.target as HTMLInputElement).files![0] as File,
|
if (!eventFiles?.length || !eventFiles[0]) {
|
||||||
);
|
return;
|
||||||
|
}
|
||||||
|
file.value = URL.createObjectURL(eventFiles[0]);
|
||||||
audio.value = new Audio(file.value);
|
audio.value = new Audio(file.value);
|
||||||
audio.value.addEventListener("loadeddata", onAudioLoadedData);
|
audio.value.addEventListener("loadeddata", onAudioLoadedData);
|
||||||
audio.value.addEventListener("ended", onAudioEnded);
|
audio.value.addEventListener("ended", onAudioEnded);
|
||||||
|
|||||||
Reference in New Issue
Block a user