]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix homepage
authorChocobozzz <me@florianbigard.com>
Mon, 13 Dec 2021 09:06:46 +0000 (10:06 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 13 Dec 2021 09:06:46 +0000 (10:06 +0100)
client/src/app/shared/shared-search/search.service.ts

index 415bf083c6c813ca0f331c6aa5de5850897c73ac..61acfb466cdcce52dfb5977c83a278d6a20278ab 100644 (file)
@@ -39,7 +39,7 @@ export class SearchService {
   }): Observable<ResultList<Video>> {
     const { search, uuids, componentPagination, advancedSearch } = parameters
 
-    if (advancedSearch.resultType !== undefined && advancedSearch.resultType !== 'videos') {
+    if (advancedSearch?.resultType !== undefined && advancedSearch.resultType !== 'videos') {
       return of({ total: 0, data: [] })
     }
 
@@ -77,7 +77,7 @@ export class SearchService {
   }): Observable<ResultList<VideoChannel>> {
     const { search, advancedSearch, componentPagination, handles } = parameters
 
-    if (advancedSearch.resultType !== undefined && advancedSearch.resultType !== 'channels') {
+    if (advancedSearch?.resultType !== undefined && advancedSearch.resultType !== 'channels') {
       return of({ total: 0, data: [] })
     }
 
@@ -115,7 +115,7 @@ export class SearchService {
   }): Observable<ResultList<VideoPlaylist>> {
     const { search, advancedSearch, componentPagination, uuids } = parameters
 
-    if (advancedSearch.resultType !== undefined && advancedSearch.resultType !== 'playlists') {
+    if (advancedSearch?.resultType !== undefined && advancedSearch.resultType !== 'playlists') {
       return of({ total: 0, data: [] })
     }