mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): correct typing when getting the Nearest LContainer (#44087)
Updating the casted typings of `getNearestLContainer` to ensure that typescript properly returns the LContainer | null type. PR Close #44087
This commit is contained in:
committed by
Andrew Scott
parent
401b5bf2af
commit
2c269c390a
@@ -74,5 +74,5 @@ function getNearestLContainer(viewOrContainer: LContainer|LView|null) {
|
||||
while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {
|
||||
viewOrContainer = viewOrContainer[NEXT];
|
||||
}
|
||||
return viewOrContainer;
|
||||
return viewOrContainer as LContainer | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user