From 0ccf258a90e097d6f2bc3a2337d49cd6bea6ad56 Mon Sep 17 00:00:00 2001 From: "homarr-renovate[bot]" <158783068+homarr-renovate[bot]@users.noreply.github.com> Date: Sun, 26 May 2024 17:51:12 +0200 Subject: [PATCH] chore(deps): update dependency tsx to v4.11.0 (#537) * chore(deps): update dependency tsx to v4.11.0 * fix: build not working --------- Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas --- apps/nextjs/package.json | 2 +- apps/nextjs/src/components/layout/analytics.tsx | 5 +++-- apps/tasks/package.json | 2 +- pnpm-lock.yaml | 16 +++++++++------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/nextjs/package.json b/apps/nextjs/package.json index cb3f9b643..029758c8d 100644 --- a/apps/nextjs/package.json +++ b/apps/nextjs/package.json @@ -73,7 +73,7 @@ "concurrently": "^8.2.2", "eslint": "^8.57.0", "prettier": "^3.2.5", - "tsx": "4.10.5", + "tsx": "4.11.0", "typescript": "^5.4.5" }, "eslintConfig": { diff --git a/apps/nextjs/src/components/layout/analytics.tsx b/apps/nextjs/src/components/layout/analytics.tsx index 76e76e2d2..322d7a0a6 100644 --- a/apps/nextjs/src/components/layout/analytics.tsx +++ b/apps/nextjs/src/components/layout/analytics.tsx @@ -4,9 +4,10 @@ import { UMAMI_WEBSITE_ID } from "@homarr/analytics"; import { api } from "@homarr/api/server"; export const Analytics = async () => { - const analytics = await api.serverSettings.getAnalytics(); + // For static pages it will not find any analytics data so we do not include the script on them + const analytics = await api.serverSettings.getAnalytics().catch(() => null); - if (analytics.enableGeneral) { + if (analytics?.enableGeneral) { return