mirror of
https://github.com/frappe/books.git
synced 2025-02-14 01:40:26 +00:00
fix: routeTo function
This commit is contained in:
parent
209e8bf7ec
commit
46a7e9e9c7
@ -248,13 +248,15 @@ export function getInvoiceStatus(doc) {
|
||||
|
||||
export function routeTo(route) {
|
||||
let routeOptions = route;
|
||||
if (typeof route === 'string' && route === router.currentRoute.fullPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof route === 'string') {
|
||||
routeOptions = { path: route };
|
||||
}
|
||||
|
||||
if (routeOptions.path !== router.currentRoute.fullPath) {
|
||||
router.push(routeOptions);
|
||||
}
|
||||
router.push(routeOptions);
|
||||
}
|
||||
|
||||
export function fuzzyMatch(keyword, candidate) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user