Commit c11f1fb965e89b7aeab7c6e957f649ab93bdd5b1
1 parent
f932a90b
UI: Fixed update state: not clear state params
Showing
1 changed file
with
2 additions
and
1 deletions
... | ... | @@ -129,7 +129,8 @@ export abstract class StateControllerComponent implements IStateControllerCompon |
129 | 129 | protected updateStateParam(newState: string, replaceCurrentHistoryUrl = false) { |
130 | 130 | this.currentState = newState; |
131 | 131 | if (this.syncStateWithQueryParam) { |
132 | - const queryParams: Params = {state: encodeURIComponent(this.currentState)}; | |
132 | + const state = this.currentState ? encodeURIComponent(this.currentState) : this.currentState; | |
133 | + const queryParams: Params = {state}; | |
133 | 134 | this.ngZone.run(() => { |
134 | 135 | this.router.navigate( |
135 | 136 | [], | ... | ... |