Skip to content

Commit

Permalink
fix(modelBuilderVisitor): crash when missing superType (accordproject…
Browse files Browse the repository at this point in the history
…#358)

Signed-off-by: Matt Roberts <[email protected]>
  • Loading branch information
mttrbrts authored Oct 21, 2021
1 parent d7a931b commit 03639f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/ui-concerto/src/modelBuilderVisitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ class ModelBuilderVisitor extends ReactFormVisitor {

visitMetaConceptDeclaration(declaration, parameters) {
const props = declaration.getProperties();
const className = props.find(({ name }) => name === 'name');
const identifier = props.find(({ name }) => name === 'name');
const superType = props.find(({ name }) => name === 'superType');
const properties = props.find(({ name }) => name === 'properties');

return <div>
<div className='mbClassNameDeclaration'>
<div>{className.accept(this, parameters)}</div>
<div>{superType.accept(this, parameters)}</div>
<div className='mbIdentifierDeclaration'>
<div>{identifier.accept(this, parameters)}</div>
{superType && <div>{superType.accept(this, parameters)}</div>}
</div>
<div className='mbFieldDeclarations'>
{properties.accept(this, parameters)}
Expand Down

0 comments on commit 03639f6

Please sign in to comment.