fix(ivy): consistenly return -1 from ViewContainerRef.indexOf for non-inserted view (#34156)
PR Close #34156
This commit is contained in:

committed by
Miško Hevery

parent
91f4b81f79
commit
0044c6621e
@ -281,9 +281,8 @@ export function createContainerRef(
|
||||
}
|
||||
|
||||
indexOf(viewRef: viewEngine_ViewRef): number {
|
||||
return this._lContainer[VIEW_REFS] !== null ?
|
||||
this._lContainer[VIEW_REFS] !.indexOf(viewRef) :
|
||||
0;
|
||||
const viewRefsArr = this._lContainer[VIEW_REFS];
|
||||
return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;
|
||||
}
|
||||
|
||||
remove(index?: number): void {
|
||||
|
Reference in New Issue
Block a user