diff --git a/.npmignore b/.npmignore index 8f189f2..2e0d9ad 100644 --- a/.npmignore +++ b/.npmignore @@ -21,4 +21,3 @@ webpack.config.js !*.d.ts /components/**/*.ts !/components/**/*.d.ts - diff --git a/components/file-upload/file-drop.directive.ts b/components/file-upload/file-drop.directive.ts index a918adf..1492f31 100644 --- a/components/file-upload/file-drop.directive.ts +++ b/components/file-upload/file-drop.directive.ts @@ -50,8 +50,10 @@ export class FileDropDirective { @HostListener('dragleave', ['$event']) public onDragLeave(event:any):any { - if (event.currentTarget === (this as any).element[0]) { - return; + if ((this as any).element) { + if (event.currentTarget === (this as any).element[0]) { + return; + } } this._preventAndStop(event);