mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Fixed cut & paste causing duplicate container children mapping (#2508)
This commit is contained in:
parent
ed75923193
commit
c55157afcd
1 changed files with 3 additions and 1 deletions
|
|
@ -741,7 +741,9 @@ export const createComponentsSlice = (set, get) => ({
|
|||
if (!state.containerChildrenMapping[parentId]) {
|
||||
state.containerChildrenMapping[parentId] = [];
|
||||
}
|
||||
state.containerChildrenMapping[parentId].push(newComponent.id);
|
||||
if (!state.containerChildrenMapping[parentId].includes(newComponent.id)) {
|
||||
state.containerChildrenMapping[parentId].push(newComponent.id);
|
||||
}
|
||||
const page = state.modules[moduleId].pages[state.currentPageIndex];
|
||||
page.components[newComponent.id] = newComponent;
|
||||
}, skipUndoRedo),
|
||||
|
|
|
|||
Loading…
Reference in a new issue