Skip to content

Commit

Permalink
Merge pull request #16613 from Nexus-Mods/16609-bugfix-mod-grouping
Browse files Browse the repository at this point in the history
fixed crash when attempting to group a mod that no longer exists
  • Loading branch information
insomnious authored Nov 12, 2024
2 parents 548d3a5 + 24fce18 commit 6dee7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extensions/mod_management/util/modGrouping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function newestFirst(lhs: IModWithState, rhs: IModWithState): number {
*/
function byEnabled(input: IModWithState[]): IModWithState[][] {
// put each enabled mod into its own group. Ideally there should only be one
const groups: IModWithState[][] = input.filter((mod => mod.enabled)).map(mod => [mod]);
const groups: IModWithState[][] = input.filter((mod => mod?.enabled === true)).map(mod => [mod]);
// it is of course possible that no mod in input is enabled.
if (groups.length === 0) {
return [ input ];
Expand Down

0 comments on commit 6dee7a3

Please sign in to comment.