1
0
mirror of https://github.com/google/nomulus synced 2026-05-23 16:21:55 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
gbrodman
a65e85f9e1 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.
2023-09-15 12:28:04 -04:00
2 changed files with 4 additions and 2 deletions

View File

@@ -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',

View File

@@ -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 }]);
}
}