Mehmet Erim
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
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(); |
|
|
|
|