diff --git a/src/components/search/LiveTVSearchResults.tsx b/src/components/search/LiveTVSearchResults.tsx index 9f9874db26..6d43e59ef6 100644 --- a/src/components/search/LiveTVSearchResults.tsx +++ b/src/components/search/LiveTVSearchResults.tsx @@ -27,7 +27,7 @@ type LiveTVSearchResultsProps = { /* * React component to display search result rows for live tv library search */ -const LiveTVSearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }: LiveTVSearchResultsProps) => { +const LiveTVSearchResults: FunctionComponent = ({ serverId = window.ApiClient.serverId(), parentId, collectionType, query }: LiveTVSearchResultsProps) => { const [ movies, setMovies ] = useState([]); const [ episodes, setEpisodes ] = useState([]); const [ sports, setSports ] = useState([]); diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index e814eba7fa..67ff69501e 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -15,7 +15,7 @@ type SearchResultsProps = { /* * React component to display search result rows for global search and non-live tv library search */ -const SearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }: SearchResultsProps) => { +const SearchResults: FunctionComponent = ({ serverId = window.ApiClient.serverId(), parentId, collectionType, query }: SearchResultsProps) => { const [ movies, setMovies ] = useState([]); const [ shows, setShows ] = useState([]); const [ episodes, setEpisodes ] = useState([]); diff --git a/src/components/search/SearchSuggestions.tsx b/src/components/search/SearchSuggestions.tsx index c13659c60d..6f76d792ef 100644 --- a/src/components/search/SearchSuggestions.tsx +++ b/src/components/search/SearchSuggestions.tsx @@ -23,7 +23,7 @@ type SearchSuggestionsProps = { parentId?: string; } -const SearchSuggestions: FunctionComponent = ({ serverId, parentId }: SearchSuggestionsProps) => { +const SearchSuggestions: FunctionComponent = ({ serverId = window.ApiClient.serverId(), parentId }: SearchSuggestionsProps) => { const [ suggestions, setSuggestions ] = useState([]); useEffect(() => {