From 3f4583ce72552b0b331d180bd381e817a2f702a7 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 25 Apr 2024 20:50:09 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20Invariant=20violation=20=E2=80=93=20team?= =?UTF-8?q?=20required=20after=20deleting=20workspace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scenes/TeamDelete.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scenes/TeamDelete.tsx b/app/scenes/TeamDelete.tsx index 0e0091e6c..ee0bfcc35 100644 --- a/app/scenes/TeamDelete.tsx +++ b/app/scenes/TeamDelete.tsx @@ -22,7 +22,7 @@ type Props = { function TeamDelete({ onSubmit }: Props) { const [isWaitingCode, setWaitingCode] = React.useState(false); const { auth } = useStores(); - const team = useCurrentTeam(); + const team = useCurrentTeam({ rejectOnEmpty: false }); const { t } = useTranslation(); const { register, @@ -61,7 +61,7 @@ function TeamDelete({ onSubmit }: Props) { required: env.EMAIL_ENABLED, }); const appName = env.APP_NAME; - const workspaceName = team.name; + const workspaceName = team?.name; return (