Merge pull request #3355 from vvlladd28/fixed/decoder-state

Fixed decoder state params
This commit is contained in:
Igor Kulikov 2020-08-25 10:31:24 +03:00 committed by GitHub
commit dfbd8c4b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ export abstract class StateControllerComponent implements IStateControllerCompon
this.rxSubscriptions.push(this.route.queryParamMap.subscribe((paramMap) => { this.rxSubscriptions.push(this.route.queryParamMap.subscribe((paramMap) => {
const dashboardId = this.route.snapshot.params.dashboardId; const dashboardId = this.route.snapshot.params.dashboardId;
if (this.dashboardId === dashboardId) { if (this.dashboardId === dashboardId) {
const newState = paramMap.get('state'); const newState = decodeURIComponent(paramMap.get('state'));
if (this.currentState !== newState) { if (this.currentState !== newState) {
this.currentState = newState; this.currentState = newState;
if (this.inited) { if (this.inited) {
@ -147,7 +147,7 @@ export abstract class StateControllerComponent implements IStateControllerCompon
} }
public reInit() { public reInit() {
this.currentState = this.route.snapshot.queryParamMap.get('state'); this.currentState = decodeURIComponent(this.route.snapshot.queryParamMap.get('state'));
this.init(); this.init();
} }