Skip to content

Commit

Permalink
fix: render null values included in enum (#9683)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>
  • Loading branch information
bejewel-kyoungmin and char0n committed May 7, 2024
1 parent 11a6ec8 commit 0dd9afa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/components/parameter-row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export default class ParameterRow extends Component {
<Markdown className="parameter__enum" source={
"<i>Available values</i> : " + paramEnum.map(function(item) {
return item
}).toArray().join(", ")}/>
}).toArray().map(String).join(", ")}/>
: null
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/plugins/json-schema-5/components/enum-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const EnumModel = ({ value, getComponent }) => {
return <span className="prop-enum">
Enum:<br />
<ModelCollapse collapsedContent={ collapsedContent }>
[ { value.join(", ") } ]
[ { value.map(String).join(", ") } ]
</ModelCollapse>
</span>
}
Expand All @@ -16,4 +16,4 @@ EnumModel.propTypes = {
getComponent: ImPropTypes.func
}

export default EnumModel
export default EnumModel

0 comments on commit 0dd9afa

Please sign in to comment.