diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-07-06 08:16:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-06 08:16:25 -0500 |
| commit | f9debb59629a4697138a14cb2fdf4f344929beac (patch) | |
| tree | 3755443c8fcbc636d420c1eaab21d8ba32120483 | |
| parent | 9c588c05600b8f2573e6152764ca291e554d3bd7 (diff) | |
| parent | ee1becac38d5753ac7249a21c553a5a3e51768d7 (diff) | |
| download | slskd-f9debb59629a4697138a14cb2fdf4f344929beac.tar.gz | |
Merge pull request #930 from slskd/fix-search
Fix occasional blank screen with console message "TypeError: Cannot read properties of undefined (reading 'isConnected')"
| -rw-r--r-- | src/web/src/components/Search/Searches.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/src/components/Search/Searches.js b/src/web/src/components/Search/Searches.js index 42b82f8c..179915ea 100644 --- a/src/web/src/components/Search/Searches.js +++ b/src/web/src/components/Search/Searches.js @@ -22,7 +22,7 @@ import SearchDetail from './Detail/SearchDetail'; import ErrorSegment from '../Shared/ErrorSegment'; import PlaceholderSegment from '../Shared/PlaceholderSegment'; -const Searches = ({ server }) => { +const Searches = ({ server } = {}) => { const [connecting, setConnecting] = useState(true); const [error, setError] = useState(undefined); const [searches, setSearches] = useState({}); @@ -173,7 +173,7 @@ const Searches = ({ server }) => { creating={creating} stopping={stopping} removing={removing} - disabled={!server.isConnected} + disabled={!server?.isConnected} onCreate={create} onStop={stop} onRemove={remove} |
