Skip to content

Commit 615c722

Browse files
author
Felix Hennig
committed
review fixes
1 parent 438fffd commit 615c722

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

js/doc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ function SchemaPart({ key, property, parent, parentSlug }) {
103103
let props = property.Properties || {};
104104

105105
let type = property.Type;
106-
let enumvals = [];
107106
if (type === 'array') {
108107
const itemsSchema = property.Items.Schema;
109108
if (itemsSchema.Type !== 'object') {
@@ -116,8 +115,8 @@ function SchemaPart({ key, property, parent, parentSlug }) {
116115
}
117116
if (property.Enum) {
118117
type = `${type}: enum`;
119-
enumvals = property.Enum;
120118
}
119+
let enumvals = property.Enum ?? [];
121120

122121
let propKeys = Object.keys(props);
123122

0 commit comments

Comments
 (0)