Skip to content

Commit

Permalink
[feat-684] fixed some map key element issues
Browse files Browse the repository at this point in the history
  • Loading branch information
silentrald committed Jan 1, 2025
1 parent 284e379 commit 1588c0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,9 @@ function ModCategory({
break;
}

otherAvailableMods.forEach(mod => {
if (combinedMods.findIndex(cm => cm.name === mod.name) === -1) {
combinedMods.push(mod);
}
});
combinedMods.push(...otherAvailableMods.filter(
mod => combinedMods.findIndex(cm => cm.name === mod.name) === -1
));
combinedMods.sort((m1, m2) => m1.name.localeCompare(m2.name));
break;

Expand Down Expand Up @@ -335,7 +333,7 @@ function ModCategory({
}}>
{combinedMods.map(mod =>
<ModCompare
key={mod._id}
key={mod.name}
mod={availableMods.find(am => am.name === mod.name)}
installed={installedMods.findIndex(im => im.name === mod.name) > -1}
otherMod={otherAvailableMods.find(oam => oam.name === mod.name)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export function LaunchSlide({ version }: Props) {
if(launchMod?.visible === false || !launchMod?.pinned) { return undefined; }
return (
<LaunchModToogle
key={launchMod.id}
icon={launchMod.icon}
infoText={launchMod.description}
text={launchMod.label}
Expand Down

0 comments on commit 1588c0d

Please sign in to comment.