diff --git a/frontend/src/Editor/EditorFunc.jsx b/frontend/src/Editor/EditorFunc.jsx index 24a8b2befe..4ca939fcce 100644 --- a/frontend/src/Editor/EditorFunc.jsx +++ b/frontend/src/Editor/EditorFunc.jsx @@ -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); diff --git a/frontend/src/_helpers/appUtils.js b/frontend/src/_helpers/appUtils.js index 33c6a4263b..0a516b6225 100644 --- a/frontend/src/_helpers/appUtils.js +++ b/frontend/src/_helpers/appUtils.js @@ -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);