From dd880529accca2d33a5c701d7ce301a47266969e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 18 May 2021 13:52:31 +0200 Subject: [PATCH] make redirects in initial url be reflected in url bar --- src/domain/navigation/URLRouter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/domain/navigation/URLRouter.js b/src/domain/navigation/URLRouter.js index ab6c9205..1c60a467 100644 --- a/src/domain/navigation/URLRouter.js +++ b/src/domain/navigation/URLRouter.js @@ -35,8 +35,10 @@ export class URLRouter { attach() { this._subscription = this._history.subscribe(url => this._applyUrl(url)); - this._applyUrl(this._history.get()); + // subscribe to path before applying initial url + // so redirects in _applyNavigationPath are reflected in url bar this._pathSubscription = this._navigation.pathObservable.subscribe(path => this._applyNavigationPath(path)); + this._applyUrl(this._history.get()); } dispose() {