mirror of
https://github.com/outline/outline.git
synced 2026-12-04 10:24:43 +03:00
fix: Invariant violation – team required after deleting workspace
This commit is contained in:
1 parent
51611f8a86
commit
3f4583ce72
1 file changed
+2
-2
@@ -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 (
|
||||
<form onSubmit={formHandleSubmit(handleSubmit)}>
|
||||
|
||||
Reference in new issue
Block a user