Fixed typo causing exceptions on unknown loaders

This commit is contained in:
Kir_Antipov 2024-01-05 15:41:55 +00:00
parent 156eade8c0
commit 84db9b85e2

View file

@ -151,7 +151,7 @@ export class ModrinthUploader extends GenericPlatformUploader<ModrinthUploaderOp
const modrinthLoaders = await api.getLoaders(); const modrinthLoaders = await api.getLoaders();
return $i(loaders) return $i(loaders)
.map(x => modrinthLoaders.find(y => IGNORE_CASE_AND_NON_WORD_CHARACTERS_EQUALITY_COMPARER(x, y.name))) .map(x => modrinthLoaders.find(y => IGNORE_CASE_AND_NON_WORD_CHARACTERS_EQUALITY_COMPARER(x, y.name)))
.filter(x => x.supported_project_types?.includes(project.project_type)) .filter(x => x?.supported_project_types.includes(project.project_type))
.map(x => x.name) .map(x => x.name)
.toArray(); .toArray();
} }