Skip to content

Commit

Permalink
Fix: scenario error on non-balanced configurations
Browse files Browse the repository at this point in the history
The code assumed Object.keys behaves for null or undefined,
it does not
  • Loading branch information
Epse committed Aug 2, 2024
1 parent 32fde4a commit b04e4bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scenario_generator/balance_splitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class BalanceSplitter {
}

public split(flightPlans: FlightPlan[]): BalancedPlan[] {
if (Object.keys(this.categories).length === 0) {
if (!this.categories || Object.keys(this.categories).length === 0) {
return [{
proportion: 1.0,
flightPlans
Expand Down

0 comments on commit b04e4bf

Please sign in to comment.