Skip to content

Commit 9bc8b7c

Browse files
authored
fix: can now conditionally render children
#7
1 parent e755e3f commit 9bc8b7c

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)