FIX: currentURL is unstable for in route transitions
If you transition just using query params but leave the rest of the route alone, sometimes router.currentURL will not update. This in turn causes active not to work correctly.
This commit is contained in:
parent
0cea63029c
commit
b4d8001dc8
|
@ -69,10 +69,13 @@ function initialize(api) {
|
|||
}
|
||||
},
|
||||
forceActive: (category, args, router) => {
|
||||
const queryParams = router.currentRoute.queryParams;
|
||||
|
||||
return (
|
||||
router.currentURL &&
|
||||
router.currentURL.indexOf("assigned=nobody") > -1 &&
|
||||
router.currentURL.indexOf("status=open") > -1
|
||||
queryParams &&
|
||||
Object.keys(queryParams).length === 2 &&
|
||||
queryParams["assigned"] === "nobody" &&
|
||||
queryParams["status"] === "open"
|
||||
);
|
||||
},
|
||||
before: "top"
|
||||
|
|
Loading…
Reference in New Issue