From 6a61f21a9e968b695c97162a2e3c233c761dfc11 Mon Sep 17 00:00:00 2001 From: mpuebla Date: Fri, 11 Oct 2019 15:03:06 -0300 Subject: [PATCH] arregle de suscribe de undefined --- .../confirmacion-carrito/confirmacion-carrito.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts b/src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts index 2e31976..55b6f6d 100644 --- a/src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts +++ b/src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts @@ -42,13 +42,17 @@ export class ConfirmacionCarritoComponent implements OnInit, OnDestroy { ngOnDestroy() { - this.subscribePago.unsubscribe(); + if (this.subscribePago !== undefined) { + this.subscribePago.unsubscribe(); + } clearTimeout(this.timerReposo); } volverPreviousPage() { - this.subscribePago.unsubscribe(); + if (this.subscribePago !== undefined) { + this.subscribePago.unsubscribe(); + } if (this.verQR) { this.verQR = !this.verQR; -- 1.9.1