landscape: redirect properly on channel archive

Previously landed on a crash.
This commit is contained in:
Matilde Park 2021-02-25 19:17:45 -05:00
parent 3805f55b43
commit 8ba29acc15
2 changed files with 3 additions and 3 deletions

View File

@ -151,7 +151,7 @@ export function GraphPermissions(props: GraphPermissionsProps) {
}
};
const schema = formSchema(Array.from(group.members));
const schema = formSchema(Array.from(group?.members ?? []));
return (
<Formik

View File

@ -51,8 +51,8 @@ export function ChannelPopoverRoutes(props: ChannelPopoverRoutesProps) {
};
const handleArchive = async () => {
const [,,,name] = association.resource.split('/');
await api.graph.deleteGraph(name);
history.push(props.baseUrl);
api.graph.deleteGraph(name);
return history.push(props.rootUrl);
};
const canAdmin = isChannelAdmin(group, association.resource);