diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-09-14 14:09:34 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-09-14 14:09:34 -0500 |
| commit | 90d13416d6c73bb86498fd7a6a8767ed5a1dcacc (patch) | |
| tree | 87db75d2064ddd7644db7f737a65415010e5bd4f /src | |
| parent | 70b143356f44d5be9bb8eb0bff3989588501d5ad (diff) | |
| download | slskd-90d13416d6c73bb86498fd7a6a8767ed5a1dcacc.tar.gz | |
don't set error if state fetch returns 401
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/components/App.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/web/src/components/App.js b/src/web/src/components/App.js index 2f2cab7d..ab45439b 100644 --- a/src/web/src/components/App.js +++ b/src/web/src/components/App.js @@ -44,12 +44,13 @@ class App extends Component { const { login } = this.state; try { - await this.fetchApplicationState(); const securityEnabled = await session.getSecurityEnabled(); if (!securityEnabled) { this.setToken(sessionStorage, tokenPassthroughValue) } + + await this.fetchApplicationState(); this.setState({ token: this.getToken(), @@ -123,7 +124,7 @@ class App extends Component { error: false, }); } catch (err) { - this.setState({ error: true }) + this.setState({ error: err?.response?.status !== 401 }) } }; |
