Fixed error ''Cannot read property 'firstChild' of null'' after Login
This commit is contained in:
parent
3d9b30567d
commit
7a6228b136
|
@ -91,12 +91,14 @@ export class AppComponent implements OnInit {
|
||||||
filter(event => event instanceof NavigationEnd),
|
filter(event => event instanceof NavigationEnd),
|
||||||
map(() => {
|
map(() => {
|
||||||
let child = this.route.firstChild;
|
let child = this.route.firstChild;
|
||||||
|
if (child != null) {
|
||||||
while (child.firstChild) {
|
while (child.firstChild) {
|
||||||
child = child.firstChild;
|
child = child.firstChild;
|
||||||
}
|
}
|
||||||
if (child.snapshot.data['title']) {
|
if (child.snapshot.data['title']) {
|
||||||
return child.snapshot.data['title'];
|
return child.snapshot.data['title'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return appTitle;
|
return appTitle;
|
||||||
})
|
})
|
||||||
).subscribe((ttl: string) => {
|
).subscribe((ttl: string) => {
|
||||||
|
|
Loading…
Reference in New Issue