From fc283f7486623aed745377ed00adf93745e735e0 Mon Sep 17 00:00:00 2001 From: "yongen.loong" Date: Wed, 13 Nov 2024 14:43:10 +0800 Subject: [PATCH] fix: error when code is undefined --- components/workspace/format-errors.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/workspace/format-errors.tsx b/components/workspace/format-errors.tsx index e0f6391..a2e4a17 100644 --- a/components/workspace/format-errors.tsx +++ b/components/workspace/format-errors.tsx @@ -92,7 +92,7 @@ function ErrorTypeLink({ type }: { type: string }) { if (kind === "warning") return warning; - if (kind === "error" && code.startsWith("CS")) + if (kind === "error" && code?.startsWith("CS")) return (