fix: delete condition

This commit is contained in:
oat_dev 2024-07-01 10:37:09 +07:00
parent 04a8c71f2d
commit 76411d2ad8

View file

@ -63,14 +63,15 @@ onMounted(async () => {
window.addEventListener("scroll", onScroll);
window.addEventListener("resize", onResize);
if (typeof route.params.name === "string") {
const res = await fetch(`/documents/${route.params.name}.md`);
if (res && res.ok) {
text.value = await res.text();
found.value = true;
parsed.value = md.parse(text.value, {});
}
// if (typeof route.params.name === "string") {
const res = await fetch(`/documents/${route.path}.md`);
if (res && res.ok) {
text.value = await res.text();
found.value = true;
parsed.value = md.parse(text.value, {});
}
// }
});
onUnmounted(() => {