Skip to content

Commit

Permalink
Return initial sim results if latest is null
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney committed Jul 9, 2024
1 parent bb8c48c commit 2d0ae36
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ public SimulationData simulateWithResults(

@Override
public Optional<SimulationData> getLatestSimulationData() {
return Optional.ofNullable(this.latestSimulationData);
if (this.latestSimulationData == null)
return Optional.ofNullable(this.initialSimulationResults);
else
return Optional.ofNullable(this.latestSimulationData);
}

}

0 comments on commit 2d0ae36

Please sign in to comment.