refactor: refs #6919 fine tunning vnCard
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-01-09 17:11:55 +01:00
parent 9e06a48841
commit a46d3affde
1 changed files with 3 additions and 2 deletions

View File

@ -28,10 +28,11 @@ const arrayData = useArrayData(props.dataKey, {
});
onBeforeMount(async () => {
const route = router.currentRoute.value;
try {
await fetchData(router.currentRoute.value.params.id);
await fetchData(route.params.id);
} catch {
const { matched: matches } = router.currentRoute.value;
const { matched: matches } = route;
const { path } = matches.at(-1);
router.push({ path: path.replace(/:id.*/, '') });
}