From 2dc22d64f9b15dfc7c0344b282b49dec58f58cfe Mon Sep 17 00:00:00 2001 From: David Code Howard Date: Tue, 6 Feb 2024 15:11:30 -0500 Subject: [PATCH] fix: Handle case where depth interval preset is null --- src/selectors.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/selectors.ts b/src/selectors.ts index 26f5e9f6..bbb5a912 100644 --- a/src/selectors.ts +++ b/src/selectors.ts @@ -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' } : {}), });