diff --git a/.npmignore b/.npmignore index bb5eac8..c869fd9 100644 --- a/.npmignore +++ b/.npmignore @@ -24,4 +24,4 @@ webpack.config.js # AoT generated files factories -/**/*.ngfactory.ts +/**/*.ngfactory.ts \ No newline at end of file diff --git a/components/file-upload/file-drop.directive.ts b/components/file-upload/file-drop.directive.ts index 13d8f3b..09047e5 100644 --- a/components/file-upload/file-drop.directive.ts +++ b/components/file-upload/file-drop.directive.ts @@ -51,8 +51,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);