diff options
author | 2022-07-07 09:31:50 +0200 | |
---|---|---|
committer | 2022-07-07 09:31:50 +0200 | |
commit | 71c52373f81cace664047edd19d9d289f45a4dff (patch) | |
tree | 69b3f1d45a8b3f1ceab9497ea3c96e9dc18e3166 /src/api/server | |
parent | 6.0.0-nightly.91 [skip ci] (diff) | |
download | ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.tar.gz ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.tar.zst ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.zip |
chore: Mobx & React-Router upgrade (#406)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/api/server')
-rw-r--r-- | src/api/server/ServerApi.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts index a636f3e0d..77a759b3e 100644 --- a/src/api/server/ServerApi.ts +++ b/src/api/server/ServerApi.ts | |||
@@ -291,6 +291,10 @@ export default class ServerApi { | |||
291 | 291 | ||
292 | // Features | 292 | // Features |
293 | async getDefaultFeatures() { | 293 | async getDefaultFeatures() { |
294 | if (apiBase() === SERVER_NOT_LOADED) { | ||
295 | throw new Error('Server not loaded'); | ||
296 | } | ||
297 | |||
294 | const request = await sendAuthRequest(`${apiBase()}/features/default`); | 298 | const request = await sendAuthRequest(`${apiBase()}/features/default`); |
295 | if (!request.ok) { | 299 | if (!request.ok) { |
296 | throw new Error(request.statusText); | 300 | throw new Error(request.statusText); |