mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fixes: redo breaks- on deleting a component and undo then redo (editor)
This commit is contained in:
parent
04141a8232
commit
f06916940c
2 changed files with 3 additions and 1 deletions
|
|
@ -908,7 +908,7 @@ const EditorComponent = (props) => {
|
|||
const updatedAppDefinition = JSON.parse(JSON.stringify(appDefinition));
|
||||
|
||||
handlePaths(patchesToRedo[0]?.value, [...patchesToRedo[0].path], updatedAppDefinition);
|
||||
|
||||
removeUndefined(updatedAppDefinition);
|
||||
const _diffPatches = diff(updatedAppDefinition, appDefinition);
|
||||
const redoDiff = diff(appDefinition, updatedAppDefinition);
|
||||
updateAppDefinitionDiff(redoDiff);
|
||||
|
|
|
|||
|
|
@ -1159,6 +1159,8 @@ export function computeComponentState(components = {}) {
|
|||
const currentComponents = getCurrentState().components;
|
||||
|
||||
Object.keys(components).forEach((key) => {
|
||||
if (!components[key]) return;
|
||||
|
||||
const { component } = components[key];
|
||||
const componentMeta = componentTypes.find((comp) => component.component === comp.component);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue