Skip to content

Commit

Permalink
chore: universal support
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Nov 1, 2016
1 parent 9106a56 commit 3424f66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ng2-uploader",
"description": "Angular2 File Uploader",
"version": "1.4.0",
"version": "1.4.1",
"license": "MIT",
"main": "ng2-uploader.js",
"typings": "ng2-uploader.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/directives/ng-file-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ export class NgFileDropDirective {
}

initEvents(): void {
if (typeof this.el.nativeElement.addEventListener === 'undefined') {
return;
}

this.el.nativeElement.addEventListener('drop', (e: any) => {
e.stopPropagation();
e.preventDefault();
Expand Down

0 comments on commit 3424f66

Please sign in to comment.