From ba53b85432dbb0c0027f13ac24d14d85017f6a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 14 Jun 2022 20:58:23 +0300 Subject: [PATCH] RED-4248: Fixed 'back' to file --- apps/red-ui/src/app/services/router-history.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/services/router-history.service.ts b/apps/red-ui/src/app/services/router-history.service.ts index 7da5297b0..a7a976343 100644 --- a/apps/red-ui/src/app/services/router-history.service.ts +++ b/apps/red-ui/src/app/services/router-history.service.ts @@ -20,10 +20,11 @@ export class RouterHistoryService { } navigateToLastDossiersScreen(): void { - if (this._router.url === this._lastDossiersScreen) { + if (this._router.url === decodeURI(this._lastDossiersScreen)) { this._router.navigate(['/']); } else { - this._router.navigate([this._lastDossiersScreen]); + const url = decodeURI(this._lastDossiersScreen).split('?')[0]; + this._router.navigate([url]); } } }