Attempt to fix the call history being emptied

This commit is contained in:
Chrystian Huot 2020-05-16 12:03:27 -04:00
parent 4cd3a2d1d8
commit c7f7f2c495

View file

@ -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();