🐛 Fix infinite redirect

This commit is contained in:
2024-08-19 12:05:13 +08:00
parent b94e6906e1
commit d6936f0056
3 changed files with 5 additions and 4 deletions

View File

@ -103,7 +103,7 @@ if (!post.value) {
statusCode: 404,
statusMessage: "Post Not Found",
})
} else if (post.value.alias) {
} else if (post.value.alias && !route.params.area) {
navigateTo(`/posts/${post.value.area_alias}/${post.value.alias}`)
}

View File

@ -102,7 +102,7 @@ if (!post.value) {
statusCode: 404,
statusMessage: "Post Not Found",
})
} else if (post.value.alias) {
} else if (post.value.alias && !route.params.area) {
navigateTo(`/posts/${post.value.area_alias}/${post.value.alias}`)
}