This commit is contained in:
Rizky 2024-07-02 10:06:47 +07:00
parent 078f89dcb4
commit 4ecc332717
1 changed files with 2 additions and 1 deletions

View File

@ -86,12 +86,13 @@ export const _ = {
} }
return new Response(""); return new Response("");
} }
case "code": { case "code": {
const arr = pathname.split("/").slice(2); const arr = pathname.split("/").slice(2);
const codepath = arr.join("/"); const codepath = arr.join("/");
const build_path = code.path(site_id, "site", "build", codepath); const build_path = code.path(site_id, "site", "build", codepath);
if ( if (
g.code_index_cache &&
g.code_index_cache[site_id] && g.code_index_cache[site_id] &&
g.code_index_cache[site_id][build_path] && g.code_index_cache[site_id][build_path] &&
g.code_index_cache[site_id][build_path].content g.code_index_cache[site_id][build_path].content