Fix group rename not working

This commit is contained in:
Mitchell McCaffrey 2021-08-07 10:29:45 +10:00
parent 37405cac60
commit 29bf7ee36b

View File

@ -217,7 +217,7 @@ export function renameGroup(
): Group[] {
let newGroups = cloneDeep(groups);
const groupIndex = newGroups.findIndex((group) => group.id === groupId);
const group = groups[groupIndex];
const group = newGroups[groupIndex];
if (group.type !== "group") {
throw new Error(`Unable to rename group ${groupId}, not of type group`);
}