fix: delete condition
This commit is contained in:
parent
04a8c71f2d
commit
76411d2ad8
1 changed files with 8 additions and 7 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue