Skip to content

Commit

Permalink
dont parse URL to avoid decoding url params
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jan 30, 2020
1 parent 2d29fbb commit f63f589
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/

import { parse } from 'url';
import { createHashHistory, History } from 'history';
import { BehaviorSubject, Observable } from 'rxjs';
import { AppBase } from 'kibana/public';
Expand Down Expand Up @@ -126,13 +125,14 @@ export function createKbnUrlTracker({
if (appIsMounted) {
return;
}
const updatedAbsoluteUrl = setStateToKbnUrl(
const updatedUrl = setStateToKbnUrl(
kbnUrlKey,
state,
{ useHash: useHash() },
baseUrl + (activeUrl || defaultSubUrl)
);
activeUrl = parse(updatedAbsoluteUrl).hash!;
// remove baseUrl prefix (just storing the sub url part)
activeUrl = updatedUrl.substr(baseUrl.length);
storageInstance.setItem(storageKey, activeUrl);
setNavLink(activeUrl);
})
Expand Down

0 comments on commit f63f589

Please sign in to comment.