Skip to content

Commit 77d3a63

Browse files
Merge pull request #1 from pturner1989/patch-1
fix check subscription exists before unsubscribing
2 parents 20b6d66 + 09720e0 commit 77d3a63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ngx-drop/file-drop.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export class FileComponent {
151151
}
152152

153153
ngOnDestroy() {
154-
this.subscription.unsubscribe();
154+
if(this.subscription) {
155+
this.subscription.unsubscribe();
156+
}
155157
}
156158
}
157159

0 commit comments

Comments
 (0)