Commit 6a61f21a9e968b695c97162a2e3c233c761dfc11
1 parent
264e5848c8
Exists in
master
and in
1 other branch
arregle de suscribe de undefined
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts
| ... | ... | @@ -42,13 +42,17 @@ export class ConfirmacionCarritoComponent implements OnInit, OnDestroy { |
| 42 | 42 | |
| 43 | 43 | ngOnDestroy() { |
| 44 | 44 | |
| 45 | - this.subscribePago.unsubscribe(); | |
| 45 | + if (this.subscribePago !== undefined) { | |
| 46 | + this.subscribePago.unsubscribe(); | |
| 47 | + } | |
| 46 | 48 | clearTimeout(this.timerReposo); |
| 47 | 49 | } |
| 48 | 50 | |
| 49 | 51 | volverPreviousPage() { |
| 50 | 52 | |
| 51 | - this.subscribePago.unsubscribe(); | |
| 53 | + if (this.subscribePago !== undefined) { | |
| 54 | + this.subscribePago.unsubscribe(); | |
| 55 | + } | |
| 52 | 56 | |
| 53 | 57 | if (this.verQR) { |
| 54 | 58 | this.verQR = !this.verQR; |