2
0
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:
18alantom 2021-12-01 18:38:47 +05:30
parent 209e8bf7ec
commit 46a7e9e9c7

View File

@ -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) {