Skip to content

Commit

Permalink
Merge pull request #1120 from DTS-STN/check-input-exist
Browse files Browse the repository at this point in the history
Add check that inputs exist
  • Loading branch information
MarcoGoC authored Nov 20, 2024
2 parents 09be97e + 01d30a0 commit 6727123
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pages/results/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ const Results: NextPage<{ adobeAnalyticsUrl: string }> = ({
const [savedInputs, setSavedInputs]: [any, (value: any) => void] =
useSessionStorage('resultPageInputs', {})

const inputHelper = new InputHelper(savedInputs.inputs, setInputs, language)
const inputHelper = new InputHelper(
'inputs' in savedInputs ? savedInputs.inputs : {},
setInputs,
language
)

const tsln = useTranslation<WebTranslations>()

Expand Down

0 comments on commit 6727123

Please sign in to comment.