Skip to content

Commit 2c269c3

Browse files
josephperrottatscott
authored andcommitted
refactor(core): correct typing when getting the Nearest LContainer (angular#44087)
Updating the casted typings of `getNearestLContainer` to ensure that typescript properly returns the LContainer | null type. PR Close angular#44087
1 parent 401b5bf commit 2c269c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/render3/util/view_traversal_utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ function getNearestLContainer(viewOrContainer: LContainer|LView|null) {
7474
while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {
7575
viewOrContainer = viewOrContainer[NEXT];
7676
}
77-
return viewOrContainer;
77+
return viewOrContainer as LContainer | null;
7878
}

0 commit comments

Comments
 (0)