mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Merge pull request #229 from Zagrios/hotfix/some-mods-not-update-after-install
[hotfix] Fix some mods not update after install
This commit is contained in:
@@ -253,11 +253,16 @@ export class BsModsManagerService {
|
||||
this.getModsInDir(version, ModsInstallFolder.PLUGINS),
|
||||
this.getModsInDir(version, ModsInstallFolder.LIBS)
|
||||
]).then(dirMods => {
|
||||
const res = [];
|
||||
if(!!bsipa){ res.push(bsipa); }
|
||||
const installedMods = Array.from(new Map<string, Mod>(dirMods.flat().map(m => [m.name, m])).values());
|
||||
res.push(...installedMods);
|
||||
return res;
|
||||
const modsDict = new Map<string, Mod>();
|
||||
|
||||
if(!!bsipa){ modsDict.set(bsipa.name, bsipa); }
|
||||
|
||||
for(const mod of dirMods.flat()){
|
||||
if(modsDict.has(mod.name)){ continue; }
|
||||
modsDict.set(mod.name, mod);
|
||||
}
|
||||
|
||||
return Array.from(modsDict.values());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user