🐛 Fix group duplicate new title bug
This commit is contained in:
@@ -65,7 +65,7 @@ const groupsActions = (setTypebot: SetTypebot): GroupsActions => ({
|
|||||||
const id = createId()
|
const id = createId()
|
||||||
|
|
||||||
const totalGroupsWithSameTitle = typebot.groups.filter(
|
const totalGroupsWithSameTitle = typebot.groups.filter(
|
||||||
(group) => group.title === group.title
|
(g) => g.title === group.title
|
||||||
).length
|
).length
|
||||||
|
|
||||||
const newGroup: Group = {
|
const newGroup: Group = {
|
||||||
@@ -76,7 +76,7 @@ const groupsActions = (setTypebot: SetTypebot): GroupsActions => ({
|
|||||||
totalGroupsWithSameTitle > 0
|
totalGroupsWithSameTitle > 0
|
||||||
? ` (${totalGroupsWithSameTitle})`
|
? ` (${totalGroupsWithSameTitle})`
|
||||||
: ''
|
: ''
|
||||||
}}`,
|
}`,
|
||||||
id,
|
id,
|
||||||
blocks: group.blocks.map((block) => duplicateBlockDraft(id)(block)),
|
blocks: group.blocks.map((block) => duplicateBlockDraft(id)(block)),
|
||||||
graphCoordinates: {
|
graphCoordinates: {
|
||||||
|
|||||||
Reference in New Issue
Block a user