From 966e4bcbabb5f49c918ecf17420f3a34ec29dad2 Mon Sep 17 00:00:00 2001 From: Alex Soloviev Date: Wed, 20 Nov 2024 07:11:47 -0700 Subject: [PATCH 1/2] add check that inputs exist --- pages/results/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/results/index.tsx b/pages/results/index.tsx index b2beef794..a017d13a6 100644 --- a/pages/results/index.tsx +++ b/pages/results/index.tsx @@ -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() From 01d30a0fe04effa51c50da5ebfe664ff15fc8d6d Mon Sep 17 00:00:00 2001 From: Alex Soloviev Date: Wed, 20 Nov 2024 07:12:46 -0700 Subject: [PATCH 2/2] empty commit to push