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/EditPoliciesScreen.tsx | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

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

diff --git a/packages/anastasis-webui/src/pages/home/EditPoliciesScreen.tsx b/packages/anastasis-webui/src/pages/home/EditPoliciesScreen.tsx
index 4e0dc2906..a57f7b08b 100644
--- a/packages/anastasis-webui/src/pages/home/EditPoliciesScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/EditPoliciesScreen.tsx
@@ -38,10 +38,7 @@ export function EditPoliciesScreen({
   if (!reducer) {
     return <div>no reducer in context</div>;
   }
-  if (
-    !reducer.currentReducerState ||
-    reducer.currentReducerState.backup_state === undefined
-  ) {
+  if (reducer.currentReducerState?.reducer_type !== "backup") {
     return <div>invalid state</div>;
   }
 
-- 
cgit v1.2.3

