From 3603e497a6570fb114ef1c9a1afd4befe856903d Mon Sep 17 00:00:00 2001 From: Palash Date: Wed, 22 Jun 2022 22:49:01 +0530 Subject: [PATCH] chore: error state is updated --- frontend/src/pages/EditRules/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/EditRules/index.tsx b/frontend/src/pages/EditRules/index.tsx index 1a65e668af..09cda600ab 100644 --- a/frontend/src/pages/EditRules/index.tsx +++ b/frontend/src/pages/EditRules/index.tsx @@ -35,7 +35,11 @@ function EditRules(): JSX.Element { } }, [isValidRuleId, ruleId]); - if ((isError && !isValidRuleId) || ruleId == null) { + if ( + (isError && !isValidRuleId) || + ruleId == null || + (data?.payload?.data === undefined && !isLoading) + ) { return
{data?.error || t('something_went_wrong')}
; }