Skip to content

Commit 677d6a7

Browse files
committed
Minor fix in ComponentComposer
1 parent b41f798 commit 677d6a7

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/framework/components/ComponentComposer/ComponentComposer.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ const renderComponent = (userComponents, description, rootProps) => {
8989
if (propertyValue) {
9090
rootProps[propertyName] = cloneDeep(propertyValue);
9191
} else {
92-
rootProps[propertyName] = null;
92+
rootProps[propertyName] = propertyValue;
9393
}
9494
} else {
95-
if (propertyValue) {
95+
if (typeof propertyValue !== 'undefined') {
9696
rootProps.push(cloneDeep(propertyValue));
9797
}
9898
}
@@ -137,10 +137,14 @@ const renderComponent = (userComponents, description, rootProps) => {
137137
|| type === constants.COMPONENT_PROPERTY_NUMBER_TYPE) {
138138
if (rootProps) {
139139
if (propertyName) {
140-
rootProps[propertyName] = propertyValue || null;
140+
rootProps[propertyName] = propertyValue;
141141
} else {
142-
if (propertyValue) {
143-
rootProps.push(propertyValue);
142+
if (typeof propertyValue !== 'undefined') {
143+
if (rootProps.push) {
144+
rootProps.push(propertyValue);
145+
} else {
146+
console.error('It seems that you missed propertyName in the page component target in the page config.');
147+
}
144148
}
145149
}
146150
}

src/framework/components/PageComposer/PageComposer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const renderComponent = (userComponents, description, serviceComponentOptions, r
103103
if (propertyValue) {
104104
rootProps[propertyName] = cloneDeep(propertyValue);
105105
} else {
106-
rootProps[propertyName] = null;
106+
rootProps[propertyName] = propertyValue;
107107
}
108108
} else {
109109
if (typeof propertyValue !== 'undefined') {

0 commit comments

Comments
 (0)