Mao před 4 roky
rodič
revize
e48ec66fad

+ 0 - 1
packages/app/src/components/SearchPage.jsx

@@ -155,7 +155,6 @@ class SearchPage extends React.Component {
   }
 
   renderSearchResultContent = () => {
-    if (this.state.selectedPage == null) { return null }
     return (
       <SearchResultContent
         appContainer={this.props.appContainer}

+ 3 - 0
packages/app/src/components/SearchPage/SearchResultContent.tsx

@@ -11,6 +11,9 @@ type Props ={
 }
 const SearchResultContent: FC<Props> = (props: Props) => {
   const page = props.selectedPage;
+  if (page == null) {
+    return;
+  }
   // Temporaly workaround for lint error
   // later needs to be fixed: RevisoinRender to typescriptcomponet
   const RevisionLoaderTypeAny: any = RevisionLoader;