Skip to content

Commit

Permalink
Fix naming
Browse files Browse the repository at this point in the history
Signed-off-by: Josh-Cena <[email protected]>
  • Loading branch information
Josh-Cena committed Sep 2, 2021
1 parent 24feb37 commit e410c0b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {Props} from '@theme/DebugJsonView';
import type {ReactJsonViewProps} from 'react-json-view';

// avoids "react-json-view" to display "root"
const RootName = false;
const RootName = null;

// Seems ReactJson does not work with SSR
// https://github.com/mac-s-g/react-json-view/issues/121
Expand Down Expand Up @@ -44,8 +44,6 @@ function DebugJsonView({src, collapseDepth}: Props): JSX.Element {
shouldCollapse={(field) => {
// By default, we collapse the json for performance reasons
// See https://github.com/mac-s-g/react-json-view/issues/235
// Non-root elements that are larger than 50 fields are collapsed
// @ts-expect-error: TODO: I have no idea why RootName is a boolean
return field.name !== RootName && Object.keys(field.src).length > 50;
}}
collapsed={collapseDepth}
Expand Down

0 comments on commit e410c0b

Please sign in to comment.