🐛 (editor) Fix text bubble update conflict when deleting group
This commit is contained in:
@ -53,6 +53,7 @@ export const blocksAction = (setTypebot: SetTypebot): BlocksActions => ({
|
|||||||
) =>
|
) =>
|
||||||
setTypebot((typebot) =>
|
setTypebot((typebot) =>
|
||||||
produce(typebot, (typebot) => {
|
produce(typebot, (typebot) => {
|
||||||
|
if (!typebot.groups[groupIndex]?.blocks[blockIndex]) return
|
||||||
const block = typebot.groups[groupIndex].blocks[blockIndex]
|
const block = typebot.groups[groupIndex].blocks[blockIndex]
|
||||||
typebot.groups[groupIndex].blocks[blockIndex] = { ...block, ...updates }
|
typebot.groups[groupIndex].blocks[blockIndex] = { ...block, ...updates }
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user