Skip to content

Commit c96bf78

Browse files
committed
Merge branch 'develop' of https://github.com/tscanlin/craft.js into develop
2 parents 5f108b5 + d259a34 commit c96bf78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/utils/serializeNode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const serializeComp = (
2020
props = Object.keys(props).reduce((result: Record<string, any>, key) => {
2121
const prop = props[key];
2222

23-
if (prop === undefined || prop === null) {
23+
if (prop === undefined || prop === null || typeof prop === 'function') {
2424
return result;
2525
}
2626

@@ -31,7 +31,7 @@ export const serializeComp = (
3131
}
3232
return serializeComp(child, resolver);
3333
});
34-
} else if (prop.type) {
34+
} else if (typeof prop.type === 'function') {
3535
result[key] = serializeComp(prop, resolver);
3636
} else {
3737
result[key] = prop;

0 commit comments

Comments
 (0)