diff --git a/projects/core/src/lib/services/routing-state.service.ts b/projects/core/src/lib/services/routing-state.service.ts index 42676389..f3383ba1 100644 --- a/projects/core/src/lib/services/routing-state.service.ts +++ b/projects/core/src/lib/services/routing-state.service.ts @@ -74,15 +74,15 @@ export class FivRoutingStateService { if (fromUrl !== this.config.root) { this.history.push(fromUrl); } - if (this.history[0] !== this.config.root) { - this.history = [this.config.root, ...this.history]; - } this.history = this.history .reverse() .filter(function (item, pos, self) { return self.indexOf(item) === pos; }) .reverse(); + if (this.history[0] !== this.config.root) { + this.history = [this.config.root, ...this.history]; + } } public getCurrentUrl(): string {