Skip to content

Commit

Permalink
Fixed Issue NgFileDrop onDestroy (cannot read property unsubscribe of…
Browse files Browse the repository at this point in the history
… undefined)
  • Loading branch information
Paul-Emile Moreau authored and jkuri committed Jul 3, 2017
1 parent 89a3f48 commit 043d500
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ngx-uploader/directives/ng-file-drop.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export class NgFileDropDirective implements OnInit, OnDestroy {
}

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

stopEvent = (e: Event) => {
Expand Down

0 comments on commit 043d500

Please sign in to comment.