Skip to content

Commit 1ef355b

Browse files
MKirovaMayaKirova
authored andcommitted
fix(IgxForOf): Add check in case node is not found in DOM.
1 parent b33459f commit 1ef355b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,9 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
10221022
* Clears focus inside the virtualized container on small scroll swaps.
10231023
*/
10241024
protected scrollFocus(node?: HTMLElement): void {
1025+
if (!node) {
1026+
return;
1027+
}
10251028
const document = node.getRootNode() as Document | ShadowRoot;
10261029
const activeElement = document.activeElement as HTMLElement;
10271030

0 commit comments

Comments
 (0)