aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-05-29 17:06:03 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-05-29 17:06:03 -0500
commit61375627fb3a82bdf53cc989339d69f39dca0165 (patch)
treee71cd7517db195c44b56f22de2ff567ae86b1a77
parent762833d3fed517fd1acad9aa5ac469a6f894bc13 (diff)
downloadslskd-61375627fb3a82bdf53cc989339d69f39dca0165.tar.gz
promisify loadstate
-rw-r--r--src/web/src/components/Search/Search.js3
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 = () => {