Skip to content

Commit

Permalink
add a new line
Browse files Browse the repository at this point in the history
  • Loading branch information
natzcam committed Dec 19, 2024
1 parent bd0871d commit a0f9a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module.exports = function generateSchema (hyperschema, opts = {}) {
for (const field of struct.requiredFields) {
str += ` if (${gen('m', field.name)} === undefined || ${gen('m', field.name)} === null) errors.push('${field.name}')\n`
}
str += ` if(errors.length) throw new Error(\`${struct.fqn}[\${errors.join(',')}] \${errors.length>1?'are':'is'} required\`)\n`
str += ` if(errors.length) throw new Error(\`${struct.fqn}[\${errors.join(',')}] \${errors.length>1?'are':'is'} required\`)\n\n`
return str
}

Expand Down

0 comments on commit a0f9a2f

Please sign in to comment.