fix: conversion casing

This commit is contained in:
not-nullptr 2024-11-15 12:17:21 +00:00
parent 13b2f01259
commit 577237177a
3 changed files with 3 additions and 4 deletions

View File

@ -34,7 +34,6 @@ export class VertFile {
}
public async convert() {
console.log(this.converter);
if (!this.converter) throw new Error("No converter found");
this.result = null;
this.progress = 0;

View File

@ -20,7 +20,7 @@
const from =
"." + f.name.toLowerCase().split(".").slice(-1);
const converter = converters.find((c) =>
c.supportedFormats.includes(from),
c.supportedFormats.includes(from.toLowerCase()),
);
if (!converter) resolve();
const to =

View File

@ -35,8 +35,8 @@
const file = files.files[i];
const converter = converters.find(
(c) =>
c.supportedFormats.includes(file.from) &&
c.supportedFormats.includes(file.to),
c.supportedFormats.includes(file.from.toLowerCase()) &&
c.supportedFormats.includes(file.to.toLowerCase()),
);
if (!converter) throw new Error("No converter found");
required.push(converter);