Skip to content

Commit cc693ff

Browse files
committed
fix: handle undefined schema for internal _genTypes
1 parent dbaa90d commit cc693ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/generator/dts.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ function _genTypes(
108108
): string[] {
109109
const buff: string[] = [];
110110

111+
if (!schema) {
112+
return buff;
113+
}
114+
111115
for (const key in schema.properties) {
112116
const val = schema.properties[key] as Schema;
113117
buff.push(...generateJSDoc(val, opts));

0 commit comments

Comments
 (0)