Skip to content

Commit

Permalink
Update ng-file-select.directive.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoSaleiro authored and jkuri committed Jun 28, 2017
1 parent a805955 commit 704a51a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ngx-uploader/directives/ng-file-select.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export class NgFileSelectDirective implements OnInit, OnDestroy {

ngOnDestroy() {
this.el.removeEventListener('change', this.fileListener, false);
this.uploadInput.unsubscribe();

if (this.uploadInput)
this.uploadInput.unsubscribe();
}

fileListener = () => {
Expand Down

0 comments on commit 704a51a

Please sign in to comment.