From 38285f885c673a9449a4e18be70d73eb0073d9d1 Mon Sep 17 00:00:00 2001 From: Kitos Date: Tue, 10 Feb 2026 16:18:34 +0100 Subject: [PATCH] fix: TypeScript errors blocking production build - Replace process.env.NODE_ENV with import.meta.env.DEV (Vite compatible) - Fix undefined not assignable to boolean|null with nullish coalescing --- frontend/src/components/ErrorBoundary.tsx | 2 +- frontend/src/components/test-detail/DetectionRuleChecklist.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/ErrorBoundary.tsx b/frontend/src/components/ErrorBoundary.tsx index d5cfc37..94aa1e2 100644 --- a/frontend/src/components/ErrorBoundary.tsx +++ b/frontend/src/components/ErrorBoundary.tsx @@ -62,7 +62,7 @@ export default class ErrorBoundary extends Component { return to the dashboard.

- {process.env.NODE_ENV === "development" && this.state.error && ( + {import.meta.env.DEV && this.state.error && (
Error details diff --git a/frontend/src/components/test-detail/DetectionRuleChecklist.tsx b/frontend/src/components/test-detail/DetectionRuleChecklist.tsx index d88f7dd..b402890 100644 --- a/frontend/src/components/test-detail/DetectionRuleChecklist.tsx +++ b/frontend/src/components/test-detail/DetectionRuleChecklist.tsx @@ -294,7 +294,7 @@ export default function DetectionRuleChecklist({ testId, user, canEdit }: Props) className="flex-1 rounded border border-gray-700 bg-gray-900 px-2 py-1.5 text-xs text-gray-200 placeholder-gray-500 focus:border-indigo-500 focus:outline-none" />