diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 4e37b75..b582f18 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -13,7 +13,7 @@ import { fileURLToPath } from "url"; */ function walkSync(dir: string, filelist: string[] = []) { // add trailing slash if not present - if (dir.at(-1) != sep) dir += sep; + if (!dir.endsWith(sep)) dir += sep; for (const file of readdirSync(dir)) { if (statSync(dir + file).isDirectory()) // read directories inside directories recursively