File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
plugins/confluence-plugin/src/components Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,11 @@ const PageContent: React.FC = () => {
3636 ) ;
3737
3838 const entityPages = useMemo ( ( ) : EntityPageI [ ] => {
39- if ( ! entityDefinition ) return [ ] ;
39+ if ( ! entityDefinition ) {
40+ return [ ] ;
41+ }
4042 const entityPages : EntityPageI [ ] = [ ] ;
43+
4144 if ( Array . isArray ( entityDefinition . info ?. [ "x-cortex-confluence" ] ?. pages ) ) {
4245 for ( const page of entityDefinition . info [ "x-cortex-confluence" ] . pages ) {
4346 const id = page . id as string ;
@@ -47,6 +50,7 @@ const PageContent: React.FC = () => {
4750 }
4851 }
4952 }
53+
5054 if ( entityDefinition . info ?. [ "x-cortex-confluence" ] ?. pageID ) {
5155 entityPages . push ( {
5256 id : `${ entityDefinition . info [ "x-cortex-confluence" ] . pageID as string } ` ,
@@ -79,9 +83,17 @@ const PageContent: React.FC = () => {
7983 }
8084 } , [ context . entity ?. tag ] ) ;
8185
82- if ( isLoading ) return < Loading /> ;
83- if ( ! baseConfluenceUrl ) return < Instructions /> ;
84- if ( errorStr ) return < Notice > { errorStr } </ Notice > ;
86+ if ( isLoading ) {
87+ return < Loading /> ;
88+ }
89+
90+ if ( ! baseConfluenceUrl ) {
91+ return < Instructions /> ;
92+ }
93+
94+ if ( errorStr ) {
95+ return < Notice > { errorStr } </ Notice > ;
96+ }
8597
8698 if ( isNil ( entityPage ) ) {
8799 return (
You can’t perform that action at this time.
0 commit comments