Browse Source

Update visibility.directive.ts

pull/9942/head
Mehmet Erim 5 years ago
committed by GitHub
parent
commit
4df6983308
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      npm/ng-packs/packages/core/src/lib/directives/visibility.directive.ts

4
npm/ng-packs/packages/core/src/lib/directives/visibility.directive.ts

@ -26,7 +26,7 @@ export class VisibilityDirective implements AfterViewInit {
if (!mutation.target) return;
const htmlNodes =
Array.from(mutation.target.childNodes).filter(node => node instanceof HTMLElement) || [];
Array.from(mutation.target.childNodes || []).filter(node => node instanceof HTMLElement) || [];
if (!htmlNodes.length) {
this.removeFromDOM();
@ -40,7 +40,7 @@ export class VisibilityDirective implements AfterViewInit {
setTimeout(() => {
const htmlNodes =
Array.from(this.focusedElement.childNodes).filter(node => node instanceof HTMLElement) ||
Array.from(this.focusedElement.childNodes || []).filter(node => node instanceof HTMLElement) ||
[];
if (!htmlNodes.length) this.removeFromDOM();

Loading…
Cancel
Save