mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge pull request #6517 from stormpython/issue/6516
Rectifies kbn-href query string not being appended
This commit is contained in:
commit
4f3d450012
2 changed files with 6 additions and 1 deletions
|
@ -36,5 +36,10 @@ describe('chrome nav apis', function () {
|
|||
const chrome = getChrome();
|
||||
expect(chrome.addBasePath('http://github.com/elastic/kibana')).to.be('http://github.com/elastic/kibana');
|
||||
});
|
||||
|
||||
it('includes the query string', function () {
|
||||
const chrome = getChrome();
|
||||
expect(chrome.addBasePath('/app/kibana?a=b')).to.be(`${basePath}/app/kibana?a=b`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@ export default function (chrome, internals) {
|
|||
var isUrl = url && isString(url);
|
||||
if (!isUrl) return url;
|
||||
|
||||
var parsed = parse(url);
|
||||
var parsed = parse(url, true);
|
||||
if (!parsed.host && parsed.pathname) {
|
||||
if (parsed.pathname[0] === '/') {
|
||||
parsed.pathname = chrome.getBasePath() + parsed.pathname;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue