diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-05-29 17:06:03 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-05-29 17:06:03 -0500 |
| commit | 61375627fb3a82bdf53cc989339d69f39dca0165 (patch) | |
| tree | e71cd7517db195c44b56f22de2ff567ae86b1a77 /src/web | |
| parent | 762833d3fed517fd1acad9aa5ac469a6f894bc13 (diff) | |
| download | slskd-61375627fb3a82bdf53cc989339d69f39dca0165.tar.gz | |
promisify loadstate
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/Search/Search.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web/src/components/Search/Search.js b/src/web/src/components/Search/Search.js index 94b36051..ab1257e9 100644 --- a/src/web/src/components/Search/Search.js +++ b/src/web/src/components/Search/Search.js @@ -79,7 +79,8 @@ class Search extends Component { } loadState = () => { - this.setState(JSON.parse(localStorage.getItem('soulseek-example-search-state')) || initialState); + return new Promise((resolve) => + this.setState(JSON.parse(localStorage.getItem('soulseek-example-search-state')) || initialState, resolve)); } componentDidMount = () => { |
