mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[kbnUrl] reload the route when going from "" to "/"
In timelion the initial route is set to '' which might not be perfectly correct, but works fine. When clicking the "new" button for the first time this causes the route to update from '' to '/', which the kbnUrl service assumes will cause a route change and does not try to force the route to reload. Instead, the router sees this as a noop and the change to the route has no effect unless you click the "new" button a second time.
This commit is contained in:
parent
5dc4afbc8d
commit
a7304ec425
1 changed files with 5 additions and 1 deletions
|
@ -186,7 +186,11 @@ function KbnUrlProvider($injector, $location, $rootScope, $parse, Private) {
|
|||
let route = $route.current && $route.current.$$route;
|
||||
if (!route) return false;
|
||||
|
||||
if (next.path !== prev.path) return false;
|
||||
// for the purposes of determining wether there will be a reload,
|
||||
// '' and '/' are equal
|
||||
const nextPath = next.path || '/';
|
||||
const prevPath = prev.path || '/';
|
||||
if (nextPath !== prevPath) return false;
|
||||
|
||||
let reloadOnSearch = route.reloadOnSearch;
|
||||
let searchSame = _.isEqual(next.search, prev.search);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue