File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 4545 "dependencies" : {
4646 "@stoplight/json" : " ^3.5.1" ,
4747 "@stoplight/react-error-boundary" : " ^1.0.0" ,
48- "@stoplight/tree-list" : " 5.0.0-beta.1 " ,
48+ "@stoplight/tree-list" : " 5.0.0-beta.2 " ,
4949 "classnames" : " ^2.2.6" ,
5050 "json-schema-merge-allof" : " https://github.com/stoplightio/json-schema-merge-allof" ,
5151 "lodash" : " ^4.17.15" ,
Original file line number Diff line number Diff line change 11import { ErrorBoundaryForwardedProps , FallbackComponent , withErrorBoundary } from '@stoplight/react-error-boundary' ;
2- import { TreeState , TreeStore } from '@stoplight/tree-list' ;
2+ import { Tree , TreeState , TreeStore } from '@stoplight/tree-list' ;
33import cn from 'classnames' ;
44import { action } from 'mobx' ;
55import * as React from 'react' ;
@@ -61,10 +61,8 @@ export class JsonSchemaViewerComponent extends React.PureComponent<IJsonSchemaVi
6161 }
6262
6363 protected renderSchema ( ) {
64- if ( this . tree . count > 1 ) {
65- for ( const child of this . tree ) {
66- this . tree . removeNode ( child ) ;
67- }
64+ if ( this . tree . count > 0 ) {
65+ this . tree . setRoot ( Tree . createArtificialRoot ( ) ) ;
6866 }
6967
7068 this . tree . populate ( ) ;
Original file line number Diff line number Diff line change 16711671 ts-loader "^6.2.1"
16721672 webpack "^4.41.5"
16731673
1674- "@stoplight/tree-list@5.0.0-beta.1 ":
1675- version "5.0.0-beta.1 "
1676- resolved "https://registry.yarnpkg.com/@stoplight/tree-list/-/tree-list-5.0.0-beta.1 .tgz#5ec0b96365af3684d118403ef6fe1f6cc0c754b9 "
1677- integrity sha512-X2ShK7uugu+Aiunx45txafPUTV+0qxjDX5n9r1y5WcwK8Ds6XMgaM0/FgzTw4I9XWQ310WK77ndsEVNn9axrhQ ==
1674+ "@stoplight/tree-list@5.0.0-beta.2 ":
1675+ version "5.0.0-beta.2 "
1676+ resolved "https://registry.yarnpkg.com/@stoplight/tree-list/-/tree-list-5.0.0-beta.2 .tgz#b60dbea9df1d3c7e01bdfd8dc05388978128df83 "
1677+ integrity sha512-yZLakRr55gf8Z2ZYuJzh9v7NJGZ8MlsKncAMa8md5HqWKucHhZXJhvlJSHLz9cwnk5dfNXSDUf+Pgv2zBe4YJA ==
16781678 dependencies:
16791679 "@stoplight/lifecycle" "^2.2.1"
16801680 "@stoplight/react-error-boundary" "^1.0.0"
You can’t perform that action at this time.
0 commit comments