mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[chrome/nav] be less defensive, fail fast
This commit is contained in:
parent
f0fe7f95af
commit
237a9e2f8a
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ export default function (chrome, internals) {
|
|||
function getAppId(url) {
|
||||
const pathname = parse(url).pathname;
|
||||
const pathnameWithoutBasepath = pathname.slice(chrome.getBasePath().length);
|
||||
const match = String(pathnameWithoutBasepath).match(/^\/app\/([^\/]+)(?:\/|\?|#|$)/);
|
||||
const match = pathnameWithoutBasepath.match(/^\/app\/([^\/]+)(?:\/|\?|#|$)/);
|
||||
if (match) return match[1];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue