Skip to content

Commit c90233f

Browse files
authored
Merge pull request #1 from kahyoung/conditional-child
fix: can now conditionally render children
2 parents e755e3f + 9bc8b7c commit c90233f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/JSONLDAbstractNode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class JSONLDAbstractNode extends React.Component {
1111
};
1212

1313
getChildJSON(child, isCollection) {
14+
if(!child) return '';
15+
1416
const ChildClass = child.type;
1517
let { children, type, id, parentID, ...schema } = child.props;
1618
if (!!parentID) schema = {'@id': parentID };

0 commit comments

Comments
 (0)