Skip to content

Commit 09720e0

Browse files
authored
fix check subscription exists before unsubscribing
1 parent 20b6d66 commit 09720e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
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)