somewhat fix meta

h
This commit is contained in:
taskylizard 2023-10-31 20:42:36 +05:30
parent d3d5858b13
commit 2b65bc9332
No known key found for this signature in database
GPG key ID: 5CABA3D642DDC497
7 changed files with 42 additions and 47 deletions

View file

@ -40,7 +40,7 @@ export default defineLoader({
const obj = Object.fromEntries(
[...guides.entries()].map((entry, index) => [index.toString(), entry]),
);
await writeFile("./guides.json",JSON.stringify(obj, null, 4), "")
return await readFile("./guides.json", { encoding: "utf-8"})
await writeFile("./guides.json", JSON.stringify(obj, null, 4), "utf-8");
return JSON.parse(await readFile("./guides.json", { encoding: "utf-8" })) as Data;
},
});