Skip to content

Commit

Permalink
fix: handle undefined schema for internal _genTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 27, 2023
1 parent dbaa90d commit cc693ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/generator/dts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ function _genTypes(
): string[] {
const buff: string[] = [];

if (!schema) {
return buff;
}

for (const key in schema.properties) {
const val = schema.properties[key] as Schema;
buff.push(...generateJSDoc(val, opts));
Expand Down

0 comments on commit cc693ff

Please sign in to comment.