From 88058ca710a7f942affb3759f0410d9b6c307f11 Mon Sep 17 00:00:00 2001 From: Akhileshrangani4 Date: Sun, 27 Oct 2024 14:20:39 -0400 Subject: [PATCH] fix: jsx.tolowercase error --- frontend/lib/tsconfig.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/lib/tsconfig.ts b/frontend/lib/tsconfig.ts index 12744d5..f1d35ce 100644 --- a/frontend/lib/tsconfig.ts +++ b/frontend/lib/tsconfig.ts @@ -73,7 +73,11 @@ function mapModule(module: string): monaco.languages.typescript.ModuleKind { ) } -function mapJSX(jsx: string): monaco.languages.typescript.JsxEmit { +function mapJSX(jsx: string | undefined): monaco.languages.typescript.JsxEmit { + if (!jsx || typeof jsx !== 'string') { + return monaco.languages.typescript.JsxEmit.React // Default value + } + const jsxMap: { [key: string]: monaco.languages.typescript.JsxEmit } = { preserve: monaco.languages.typescript.JsxEmit.Preserve, react: monaco.languages.typescript.JsxEmit.React,