Skip to content

Commit

Permalink
fix: Invariant violation – team required after deleting workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Apr 26, 2024
1 parent 51611f8 commit 3f4583c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scenes/TeamDelete.tsx
Expand Up @@ -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,
Expand Down Expand Up @@ -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 (
<form onSubmit={formHandleSubmit(handleSubmit)}>
Expand Down

0 comments on commit 3f4583c

Please sign in to comment.