Skip to content

Commit 438fffd

Browse files
author
Felix Hennig
committed
review fixes
1 parent 5cb0eb7 commit 438fffd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

js/doc.js

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

105105
let type = property.Type;
106-
let enumvals = null;
106+
let enumvals = [];
107107
if (type === 'array') {
108108
const itemsSchema = property.Items.Schema;
109109
if (itemsSchema.Type !== 'object') {
@@ -115,7 +115,7 @@ function SchemaPart({ key, property, parent, parentSlug }) {
115115
}
116116
}
117117
if (property.Enum) {
118-
type = `${type}: enum`
118+
type = `${type}: enum`;
119119
enumvals = property.Enum;
120120
}
121121

@@ -166,7 +166,7 @@ function SchemaPart({ key, property, parent, parentSlug }) {
166166
<button class="btn btn-sm position-absolute right-0 top-0 m-5 copy-url z-10" type="button" data-clipboard-text="${fullLink}">🔗</button>
167167
</summary>
168168
<div id="${slug}" class="collapse-content">
169-
${enumvals ? html`<div class="property-description mb-10">
169+
${enumvals.length > 0 ? html`<div class="property-description mb-10">
170170
Enum variants: ${enumvals.map(v => html`<span class="badge text-muted mr-5 mb-5"><code>${v}</code></span>`)}
171171
</div>` : ''}
172172
${React.createElement("div", { className: 'property-description', dangerouslySetInnerHTML: { __html: getDescription(property) } })}

static/js/doc.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/doc.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)