2
0

🐛 (editor) Fix text bubble update conflict when deleting group

This commit is contained in:
Baptiste Arnaud
2024-04-02 16:15:08 +02:00
parent af4dd95663
commit 7ce6d737f5

View File

@ -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 }
}) })