Skip to content
Snippets Groups Projects
Commit 13f0ef3a authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(news): tag resolver redirect making infinite loop on news page

parent ad6c9164
No related branches found
No related tags found
3 merge requests!418V2.1.0,!400V2.0,!230V2.0
......@@ -7,13 +7,12 @@ import { PostService } from '../services/post.service';
@Injectable()
export class TagResolver implements Resolve<TagWithMeta> {
constructor(private postService: PostService, private router: Router) {}
constructor(private postService: PostService) {}
resolve(): Observable<TagWithMeta> {
return this.postService.getTags().pipe(
map((res) => res),
catchError(() => {
this.router.navigate(['/home']);
return new Observable<TagWithMeta>();
})
);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment