diff --git a/src/helpers/group.ts b/src/helpers/group.ts index ccbd0d3..78124ff 100644 --- a/src/helpers/group.ts +++ b/src/helpers/group.ts @@ -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`); }