Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Nov 20, 2016
1 parent 5d171ad commit b7d9586
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.5.1",
"version": "1.5.2",
"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 @@ -108,6 +108,10 @@ export class NgFileDropDirective {
}

@HostListener('change') onChange(): void {
if (!this.el.nativeElement.files || !this.el.nativeElement.files.length) {
return;
}

this.files = Array.from(this.el.nativeElement.files);

if (this.options.filterExtensions && this.options.allowedExtensions) {
Expand Down

0 comments on commit b7d9586

Please sign in to comment.