Skip to content

Commit

Permalink
fix: Handle case where depth interval preset is null
Browse files Browse the repository at this point in the history
  • Loading branch information
David Code Howard committed Feb 6, 2024
1 parent 8ba0502 commit 2dc22d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ export const selectSoilDataIntervals = createSelector(
(soilData: SoilData, projectSettings: ProjectSoilSettings | undefined) => {
if (projectSettings === undefined) {
// check site presets

const presetIntervals = generateSiteIntervalPreset({
...soilData,
// default is LANDPKS if preset is not set
...(soilData.depthIntervalPreset === undefined
...(!soilData.depthIntervalPreset
? { depthIntervalPreset: 'LANDPKS' }
: {}),
});
Expand Down

0 comments on commit 2dc22d6

Please sign in to comment.