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:
Joey Perrott
2021-11-05 12:59:28 -07:00
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;
}