From b28583ba7e3be7e4f69aaf543d087b6446f50cf0 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Wed, 13 Apr 2022 08:44:37 +0200
Subject: anastasis: tag state properly

---
 packages/anastasis-webui/src/pages/home/RecoveryFinishedScreen.tsx | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'packages/anastasis-webui/src/pages/home/RecoveryFinishedScreen.tsx')

diff --git a/packages/anastasis-webui/src/pages/home/RecoveryFinishedScreen.tsx b/packages/anastasis-webui/src/pages/home/RecoveryFinishedScreen.tsx
index d83482559..326a9a59d 100644
--- a/packages/anastasis-webui/src/pages/home/RecoveryFinishedScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/RecoveryFinishedScreen.tsx
@@ -18,10 +18,7 @@ export function RecoveryFinishedScreen(): VNode {
   if (!reducer) {
     return <div>no reducer in context</div>;
   }
-  if (
-    !reducer.currentReducerState ||
-    reducer.currentReducerState.recovery_state === undefined
-  ) {
+  if (reducer.currentReducerState?.reducer_type !== "recovery") {
     return <div>invalid state</div>;
   }
   const secretName = reducer.currentReducerState.recovery_document?.secret_name;
-- 
cgit v1.2.3

