mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-10-28 07:44:21 +01:00
fix(converters): resolve reference mutation and discovery priority in main.ts
This commit is contained in:
@@ -246,8 +246,8 @@ async function mainConverter(
|
||||
converterFunc = properties[converterName]?.converter;
|
||||
} else {
|
||||
// Iterate over each converter in properties
|
||||
for (converterName in properties) {
|
||||
const converterObj = properties[converterName];
|
||||
for (const name in properties) {
|
||||
const converterObj = properties[name];
|
||||
|
||||
if (!converterObj) {
|
||||
break;
|
||||
@@ -262,6 +262,9 @@ async function mainConverter(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (converterFunc) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +352,7 @@ for (const converterName in properties) {
|
||||
if (allTargets[converterName]) {
|
||||
allTargets[converterName].push(...(converterProperties.to[key] || []));
|
||||
} else {
|
||||
allTargets[converterName] = converterProperties.to[key] || [];
|
||||
allTargets[converterName] = [...(converterProperties.to[key] || [])];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user