fixes: container widget is not getting saved on drop (#7718)

This commit is contained in:
Arpit 2023-10-09 20:51:58 +05:30 committed by GitHub
parent 6411a06e5d
commit 6750bf559d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -1789,7 +1789,7 @@ const EditorComponent = (props) => {
<div className="pages-container">
{selectedComponents.length === 1 &&
!isEmpty(appDefinition?.pages[currentPageId]?.components) &&
!isEmpty(appDefinition?.pages[currentPageId]?.components[selectedComponents[0].id]) && (
!isEmpty(appDefinition?.pages[currentPageId]?.components[selectedComponents[0]?.id]) && (
<Inspector
moveComponents={moveComponents}
componentDefinitionChanged={componentDefinitionChanged}

View file

@ -72,6 +72,8 @@ function generatePath(obj, targetKey, currentPath = '') {
}
function getValueFromJson(json, path) {
if (!path || typeof path !== 'string') return null;
let value = json;
path.split('.').forEach((key) => {
value = value[key];