Skip to content

Commit 76005e0

Browse files
authored
fix: Check that property is an object (#162)
1 parent 881cc80 commit 76005e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/typescript/src/core/schemaToTypeAliasDeclaration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export const getType = (
227227
const members: ts.TypeElement[] = Object.entries(
228228
schema.properties || {}
229229
).map(([key, property]) => {
230-
const isEnum = "enum" in property && useEnumsConfigBase;
230+
const isEnum = typeof property === "object" && "enum" in property && useEnumsConfigBase;
231231

232232
const propertyNode = f.createPropertySignature(
233233
undefined,

0 commit comments

Comments
 (0)