Skip to content

Commit

Permalink
fix: TypeError when technology ID is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Mar 26, 2024
1 parent 4542b26 commit 61537d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game-logic/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type EmpireEffectSources = Pick<Empire, 'traits' | 'technologies'>;
export function getEmpireEffectSources(empire: EmpireEffectSources): EffectSource[] {
return [
...empire.traits.map(t => TRAITS[t]),
...getEffectiveTechnologies(empire.technologies.map(t => TECHNOLOGIES[t])),
...getEffectiveTechnologies(empire.technologies.map(t => TECHNOLOGIES[t]).filter(t => t)),
];
}

Expand Down

0 comments on commit 61537d5

Please sign in to comment.