Bugfix/fix internal navigation with query param (#114)

* Fix internal navigation with query parameter

* Add guard

* Update changelog
pull/115/head
Thomas 3 years ago committed by GitHub
parent 9851cce382
commit b4762dc463
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Hid footer on mobile (except on landing page)
### Fixed
- Fixed the internal navigation of the _Zen Mode_ in combination with a query parameter
## 1.6.0 - 22.05.2021
### Added

@ -46,7 +46,7 @@ export class PerformanceChartDialog {
this.historicalDataItems = this.data.historicalDataItems;
this.historicalDataItems.forEach((historicalDataItem) => {
this.historicalDataItems?.forEach((historicalDataItem) => {
const benchmarkItem = historicalData.find((item) => {
return item.date === historicalDataItem.date;
});

@ -45,12 +45,12 @@ export class AuthGuard implements CanActivate {
)
.subscribe((user) => {
if (
state.url === '/home' &&
state.url.startsWith('/home') &&
user.settings.viewMode === ViewMode.ZEN
) {
this.router.navigate(['/zen']);
resolve(false);
} else if (state.url === '/start') {
} else if (state.url.startsWith('/start')) {
if (user.settings.viewMode === ViewMode.ZEN) {
this.router.navigate(['/zen']);
} else {
@ -59,7 +59,7 @@ export class AuthGuard implements CanActivate {
resolve(false);
} else if (
state.url === '/zen' &&
state.url.startsWith('/zen') &&
user.settings.viewMode === ViewMode.DEFAULT
) {
this.router.navigate(['/home']);

Loading…
Cancel
Save