Commit 5900479c40bfb6db3849a41fe0bd807e66858eee

Authored by Vladyslav Prykhodko
1 parent 2659826f

Fixed decoder state params

... ... @@ -175,7 +175,7 @@ export function objToBase64URI(obj: any): string {
175 175 }
176 176
177 177 export function base64toObj(b64Encoded: string): any {
178   - const json = decodeURIComponent(atob(decodeURIComponent(b64Encoded)).split('').map((c) => {
  178 + const json = decodeURIComponent(atob(b64Encoded).split('').map((c) => {
179 179 return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
180 180 }).join(''));
181 181 return JSON.parse(json);
... ...
... ... @@ -100,7 +100,7 @@ export abstract class StateControllerComponent implements IStateControllerCompon
100 100 this.rxSubscriptions.push(this.route.queryParamMap.subscribe((paramMap) => {
101 101 const dashboardId = this.route.snapshot.params.dashboardId;
102 102 if (this.dashboardId === dashboardId) {
103   - const newState = paramMap.get('state');
  103 + const newState = decodeURIComponent(paramMap.get('state'));
104 104 if (this.currentState !== newState) {
105 105 this.currentState = newState;
106 106 if (this.inited) {
... ... @@ -147,7 +147,7 @@ export abstract class StateControllerComponent implements IStateControllerCompon
147 147 }
148 148
149 149 public reInit() {
150   - this.currentState = this.route.snapshot.queryParamMap.get('state');
  150 + this.currentState = decodeURIComponent(this.route.snapshot.queryParamMap.get('state'));
151 151 this.init();
152 152 }
153 153
... ...