diff options
Diffstat (limited to 'client/src/app/root.component.ts')
-rw-r--r-- | client/src/app/root.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/root.component.ts b/client/src/app/root.component.ts index c65f59448..ae999e058 100644 --- a/client/src/app/root.component.ts +++ b/client/src/app/root.component.ts | |||
@@ -30,12 +30,12 @@ export class RootComponent implements OnInit { | |||
30 | ])) | 30 | ])) |
31 | ) | 31 | ) |
32 | .subscribe(actor => { | 32 | .subscribe(actor => { |
33 | if (actor.constructor.name === 'Account') { | 33 | if (/\/accounts\//.test(actor.url)) { |
34 | this.router.navigateByUrl(`/accounts/${actor.name}`) | 34 | this.router.navigate([ `/a/${actor.name}` ], { state: { type: 'others', obj: { status: 200 } }, skipLocationChange: true }) |
35 | } | 35 | } |
36 | 36 | ||
37 | if (actor.constructor.name === 'VideoChannel') { | 37 | if (/\/video-channels\//.test(actor.url)) { |
38 | this.router.navigateByUrl(`/video-channels/${actor.name}`) | 38 | this.router.navigate([ `/c/${actor.name}` ], { state: { type: 'others', obj: { status: 200 } }, skipLocationChange: true }) |
39 | } | 39 | } |
40 | }) | 40 | }) |
41 | } | 41 | } |