Skip to content

Commit

Permalink
🐛 Fix group duplicate new title bug
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Oct 28, 2023
1 parent bed8b42 commit 2d1ce73
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const groupsActions = (setTypebot: SetTypebot): GroupsActions => ({
const id = createId()

const totalGroupsWithSameTitle = typebot.groups.filter(
(group) => group.title === group.title
(g) => g.title === group.title
).length

const newGroup: Group = {
Expand All @@ -76,7 +76,7 @@ const groupsActions = (setTypebot: SetTypebot): GroupsActions => ({
totalGroupsWithSameTitle > 0
? ` (${totalGroupsWithSameTitle})`
: ''
}}`,
}`,
id,
blocks: group.blocks.map((block) => duplicateBlockDraft(id)(block)),
graphCoordinates: {
Expand Down

1 comment on commit 2d1ce73

@vercel
Copy link

@vercel vercel bot commented on 2d1ce73 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
app.typebot.io
builder-v2-typebot-io.vercel.app

Please sign in to comment.