fix: Default boolean property value not rendered #1779 (#1781)

This commit is contained in:
Andriy Zaleskyy 2021-10-27 16:55:20 +03:00 committed by GitHub
parent ebbd256b1f
commit 734080c354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ export class EnumValues extends React.PureComponent<EnumValuesProps, EnumValuesS
{values.length === 1 ? l('enumSingleValue') : l('enum')}:
</FieldLabel>{' '}
{displayedItems.map((value, idx) => {
const exampleValue = enumSkipQuotes ? value : JSON.stringify(value);
const exampleValue = enumSkipQuotes ? String(value) : JSON.stringify(value);
return (
<React.Fragment key={idx}>
<ExampleValue>{exampleValue}</ExampleValue>{' '}

View File

@ -13,7 +13,7 @@ export class FieldDetail extends React.PureComponent<FieldDetailProps> {
return null;
}
const value = this.props.raw ? this.props.value : JSON.stringify(this.props.value);
const value = this.props.raw ? String(this.props.value) : JSON.stringify(this.props.value);
return (
<div>