fix: address remaining cubic review feedback

This commit is contained in:
OrbanGergo 2026-08-01 16:47:04 +03:00
parent fd7841b3c2
commit 23d405e7db
2 changed files with 5 additions and 3 deletions

View File

@ -8,6 +8,7 @@ const fileNames = [];
let fileType;
let pendingFiles = 0;
let formatSelected = false;
let latestSourcesRequestTarget = null;
dropZone.addEventListener("dragover", (e) => {
e.preventDefault();
@ -100,6 +101,7 @@ const showSupportedSources = (targetExtension) => {
supportedSourcesEl.textContent = `Supported source types: ${unique.join(", ")}`;
})
.catch((err) => {
if (latestSourcesRequestTarget !== targetExtension) return;
console.error(err);
supportedSourcesEl.textContent = "";
});

View File

@ -299,10 +299,10 @@ for (const converterName in properties) {
for (const target of toList) {
const targetClean = normalizeOutputFiletype(target);
if (!possibleSources[target]) possibleSources[target] = {};
if (!possibleSources[targetClean]) possibleSources[targetClean] = {};
const existing = possibleSources[target][converterName];
possibleSources[target][converterName] = existing
const existing = possibleSources[targetClean][converterName];
possibleSources[targetClean][converterName] = existing
? Array.from(new Set([...existing, ...fromList]))
: [...fromList];
}