mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[hotfix] fixed handling for filtering out mods to uninstall
This commit is contained in:
@@ -531,9 +531,11 @@ export class BsModsManagerService {
|
||||
const versionMods = await this.getAvailableMods(version);
|
||||
const installedMods = await this.getInstalledMods(version);
|
||||
|
||||
const fullInstalledMods: BbmFullMod[] = installedMods?.map(version => {
|
||||
return { version, mod: versionMods.find(mod => version.modId === mod.mod.id)?.mod };
|
||||
}) ?? [];
|
||||
const fullInstalledMods = (installedMods || []).reduce((mods, version) => {
|
||||
const mod = versionMods.find(mod => version.modId === mod.mod.id)?.mod;
|
||||
if (mod) { mods.push({ version, mod }); }
|
||||
return mods;
|
||||
}, [] as BbmFullMod[]);
|
||||
|
||||
const progress = { current: 0, total: fullInstalledMods.length };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user