diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-18 15:31:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-18 15:40:59 +0100 |
commit | ba430d7516bc5b1324b60571ba7594460969b7fb (patch) | |
tree | df5c6952c82f49a94c0a884bbc97d4a0cbd9f867 /client/src/app/core/routing/redirect.service.ts | |
parent | 5dfb7c1dec8222b0bbccac5b56ad46da1438747e (diff) | |
download | PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.gz PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.zst PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.zip |
Lazy load static objects
Diffstat (limited to 'client/src/app/core/routing/redirect.service.ts')
-rw-r--r-- | client/src/app/core/routing/redirect.service.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index 43b89f08d..3982cf36f 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts | |||
@@ -16,15 +16,15 @@ export class RedirectService { | |||
16 | private serverService: ServerService | 16 | private serverService: ServerService |
17 | ) { | 17 | ) { |
18 | // The config is first loaded from the cache so try to get the default route | 18 | // The config is first loaded from the cache so try to get the default route |
19 | const config = this.serverService.getConfig() | 19 | const tmpConfig = this.serverService.getTmpConfig() |
20 | if (config && config.instance && config.instance.defaultClientRoute) { | 20 | if (tmpConfig && tmpConfig.instance && tmpConfig.instance.defaultClientRoute) { |
21 | RedirectService.DEFAULT_ROUTE = config.instance.defaultClientRoute | 21 | RedirectService.DEFAULT_ROUTE = tmpConfig.instance.defaultClientRoute |
22 | } | 22 | } |
23 | 23 | ||
24 | // Load default route | 24 | // Load default route |
25 | this.serverService.configLoaded | 25 | this.serverService.getConfig() |
26 | .subscribe(() => { | 26 | .subscribe(config => { |
27 | const defaultRouteConfig = this.serverService.getConfig().instance.defaultClientRoute | 27 | const defaultRouteConfig = config.instance.defaultClientRoute |
28 | 28 | ||
29 | if (defaultRouteConfig) { | 29 | if (defaultRouteConfig) { |
30 | RedirectService.DEFAULT_ROUTE = defaultRouteConfig | 30 | RedirectService.DEFAULT_ROUTE = defaultRouteConfig |