From 8609c43b568b97f0a0d68716b9c426b63a0b2df9 Mon Sep 17 00:00:00 2001 From: Andriy Zaleskyy Date: Wed, 27 Oct 2021 16:47:58 +0300 Subject: [PATCH] fix: Default boolean property value not rendered #1779 --- src/components/Fields/EnumValues.tsx | 2 +- src/components/Fields/FieldDetail.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Fields/EnumValues.tsx b/src/components/Fields/EnumValues.tsx index d10f9f692a..05bb8072c1 100644 --- a/src/components/Fields/EnumValues.tsx +++ b/src/components/Fields/EnumValues.tsx @@ -59,7 +59,7 @@ export class EnumValues extends React.PureComponent{' '} {displayedItems.map((value, idx) => { - const exampleValue = enumSkipQuotes ? value : JSON.stringify(value); + const exampleValue = enumSkipQuotes ? String(value) : JSON.stringify(value); return ( {exampleValue}{' '} diff --git a/src/components/Fields/FieldDetail.tsx b/src/components/Fields/FieldDetail.tsx index 0697aeeaec..e5b2818969 100644 --- a/src/components/Fields/FieldDetail.tsx +++ b/src/components/Fields/FieldDetail.tsx @@ -13,7 +13,7 @@ export class FieldDetail extends React.PureComponent { 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 (