Skip to content

Commit c8dc7ab

Browse files
committed
bugfix
1 parent cb70b86 commit c8dc7ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/json-mock-from-schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const SchemaType = {
1616
}
1717

1818
export function toSchemaType(schema) {
19-
return schema.openapi ? SchemaType.OPENAPI : SchemaType.JSON
19+
return schema?.openapi ? SchemaType.OPENAPI : SchemaType.JSON
2020
}
2121

2222
export function toJsonMock(type, schema) {

0 commit comments

Comments
 (0)