From c7f7f2c4958c80488409ddf282ef725073ae9da7 Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Sat, 16 May 2020 12:03:27 -0400 Subject: [PATCH] Attempt to fix the call history being emptied --- .../app/components/rdio-scanner/rdio-scanner.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/app/components/rdio-scanner/rdio-scanner.component.ts b/client/src/app/components/rdio-scanner/rdio-scanner.component.ts index 88e4f8f..f204bef 100644 --- a/client/src/app/components/rdio-scanner/rdio-scanner.component.ts +++ b/client/src/app/components/rdio-scanner/rdio-scanner.component.ts @@ -659,8 +659,9 @@ export class AppRdioScannerComponent implements OnDestroy, OnInit { } if ( - this.call?.id !== this.callPrevious?.id && - !this.callHistory.find((call: RdioScannerCall) => call?.id === this.callPrevious?.id) + this.callPrevious && + this.callPrevious.id !== this.call.id && + !this.callHistory.find((call: RdioScannerCall) => call?.id === this.callPrevious.id) ) { this.callHistory.pop();