File tree Expand file tree Collapse file tree 2 files changed +17
-19
lines changed
features/editor/views/TreeView Expand file tree Collapse file tree 2 files changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -10,22 +10,20 @@ export const TreeView = () => {
1010 const json = useJson ( state => state . json ) ;
1111
1212 return (
13- < >
14- < JSONTree
15- hideRoot
16- data = { JSON . parse ( json ) }
17- valueRenderer = { ( valueAsString , value ) => < Value { ...{ valueAsString, value } } /> }
18- labelRenderer = { ( keyPath , nodeType ) => < Label { ...{ keyPath, nodeType } } /> }
19- theme = { {
20- extend : {
21- overflow : "scroll" ,
22- height : "100%" ,
23- scheme : "monokai" ,
24- author : "wimer hazenberg (http://www.monokai.nl)" ,
25- base00 : theme . GRID_BG_COLOR ,
26- } ,
27- } }
28- />
29- </ >
13+ < JSONTree
14+ hideRoot
15+ data = { JSON . parse ( json ) }
16+ valueRenderer = { ( valueAsString , value ) => < Value { ...{ valueAsString, value } } /> }
17+ labelRenderer = { ( keyPath , nodeType ) => < Label { ...{ keyPath, nodeType } } /> }
18+ theme = { {
19+ extend : {
20+ overflow : "scroll" ,
21+ height : "100%" ,
22+ scheme : "monokai" ,
23+ author : "wimer hazenberg (http://www.monokai.nl)" ,
24+ base00 : theme . GRID_BG_COLOR ,
25+ } ,
26+ } }
27+ />
3028 ) ;
3129} ;
Original file line number Diff line number Diff line change @@ -178,8 +178,8 @@ const useFile = create<FileStates & JsonActions>()((set, get) => ({
178178 }
179179 } ,
180180 checkEditorSession : ( url , widget ) => {
181- if ( url && typeof url === "string" ) {
182- if ( isURL ( url ) ) return get ( ) . fetchUrl ( url ) ;
181+ if ( url && typeof url === "string" && isURL ( url ) ) {
182+ return get ( ) . fetchUrl ( url ) ;
183183 }
184184
185185 let contents = defaultJson ;
You can’t perform that action at this time.
0 commit comments