fix(router): update type for routerLink to include null and undefined (#37018)
PR #13380 added support for `null` and `undefined` but the type on the parameter was not updated. This would result in a compilation error if `fullTemplateTypeCheck` is enabled. Fixes #36544 PR Close #37018
This commit is contained in:

committed by
Kara Erickson

parent
87f951c5c1
commit
ef9f8df9ed
@ -139,7 +139,7 @@ export class RouterLink {
|
||||
}
|
||||
|
||||
@Input()
|
||||
set routerLink(commands: any[]|string) {
|
||||
set routerLink(commands: any[]|string|null|undefined) {
|
||||
if (commands != null) {
|
||||
this.commands = Array.isArray(commands) ? commands : [commands];
|
||||
} else {
|
||||
@ -229,7 +229,7 @@ export class RouterLinkWithHref implements OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
@Input()
|
||||
set routerLink(commands: any[]|string) {
|
||||
set routerLink(commands: any[]|string|null|undefined) {
|
||||
if (commands != null) {
|
||||
this.commands = Array.isArray(commands) ? commands : [commands];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user