const route = useRoute()
const routePath = computed(() => route.path)
const routePathArray = routePath.value.split('/')
const routeToPath = routePathArray.slice(0, -1).join('/')
onBeforeMount(() => {
if (routePath.value !== '/' || routeToPath !== '') {
navigateTo(routeToPath, { replace: true })
} else {
clearError()
}
})
const route = useRoute()
const routePath = computed(() => route.path)
const routePathArray = routePath.value.split('/')
const routeToPath = routePathArray.slice(0, -1).join('/')
onBeforeMount(() => {
if (routePath.value !== '/' || routeToPath !== '') {
navigateTo(routeToPath, { replace: true })
} else {
clearError()
}
})