Skip to content

Commit

Permalink
fix: Update if statement to gen cpp code properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ksentak committed Oct 21, 2024
1 parent 74b3611 commit 1c6ca7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/macrofier/types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,12 @@ function getSchemaShape(schema = {}, module = {}, { templateDir = 'types', paren
else if (schema.type) {
const shape = insertPrimitiveMacros(getTemplate(path.join(templateDir, 'primitive' + suffix)), schema, module, theTitle, templateDir)
result = result.replace(/\$\{shape\}/g, shape)
if (!config.langcode) {
return insertSchemaMacros(result, schema, module, { name: theTitle, parent, property, required, templateDir })
}
if (level > 0 || primitive) {
return insertSchemaMacros(result, schema, module, { name: theTitle, parent, property, required, templateDir })
}
}

return ''
Expand Down

0 comments on commit 1c6ca7e

Please sign in to comment.