fix: address remaining cubic review feedback
This commit is contained in:
parent
fd7841b3c2
commit
23d405e7db
|
|
@ -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 = "";
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue