diff --git a/bun.lockb b/bun.lockb index 1f9449b..076c2c6 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 8db946b..8a96696 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.1.0", "@kitajs/ts-html-plugin": "^1.0.1", + "@total-typescript/ts-reset": "^0.5.1", "bun-types": "latest", "concurrently": "^8.2.1", "drizzle-kit": "^0.19.13", diff --git a/reset.d.ts b/reset.d.ts new file mode 100644 index 0000000..e186b1f --- /dev/null +++ b/reset.d.ts @@ -0,0 +1 @@ +import "@total-typescript/ts-reset"; \ No newline at end of file diff --git a/src/pages/index.tsx b/src/pages/index.tsx index a1579a8..18933d3 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,7 +19,13 @@ export const index = new Elysia() const revalidate = request.headers.get("HX-Revalidate"); if (revalidate) { const tags = JSON.parse(revalidate); - tags.forEach((tag: string) => { + if (!Array.isArray(tags)) { + return; + } + tags.forEach((tag) => { + if (typeof tag !== "string") { + return; + } revalidateTag(tag); }); }