diff --git a/src/components/Ecogesture/SingleEcogesture.tsx b/src/components/Ecogesture/SingleEcogesture.tsx
index 5694040186f35cc094a56adf5b7e7620272d51ed..9267cccc37994269bccc4368aadfc3a63d02acc2 100644
--- a/src/components/Ecogesture/SingleEcogesture.tsx
+++ b/src/components/Ecogesture/SingleEcogesture.tsx
@@ -44,7 +44,8 @@ const SingleEcogesture: React.FC<SingleEcogestureProps> = ({
   const [isObjective, setIsObjective] = useState<boolean>(false)
   const [isLoading, setIsLoading] = useState<boolean>(true)
   const ecogestureID: string = match.params.id
-  const selectionCompleted = location.state.selectionCompleted
+  const selectionCompleted =
+    location && location.state && location.state.selectionCompleted
 
   const ecogestureService = useMemo(() => new EcogestureService(client), [
     client,