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

View File

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