mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 03:30:46 +02:00
Don't include a nextUrl when accessing the console homepage (#2149)
In this case we should just display the standard page, no need to redirect anywhere since there's nothing to redirect to.
This commit is contained in:
parent
2713a10a07
commit
a65e85f9e1
2 changed files with 4 additions and 2 deletions
|
@ -14,9 +14,10 @@
|
|||
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { RegistrarService } from './registrar.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { RegistrarService } from './registrar.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-empty-registrar',
|
||||
templateUrl: './emptyRegistrar.component.html',
|
||||
|
|
|
@ -31,7 +31,8 @@ export class RegistrarGuard {
|
|||
return true;
|
||||
}
|
||||
// Get the full URL including any nested children (skip the initial '#/')
|
||||
const nextUrl = location.hash.split('#/')[1];
|
||||
// NB: an empty nextUrl takes the user to the home page
|
||||
const nextUrl = location.hash.split('#/')[1] || '';
|
||||
return this.router.navigate([`/empty-registrar`, { nextUrl }]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue