From 9fed2dc065f8f718918ff224f8ea19ea69611620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Fri, 21 Nov 2025 16:48:35 +0800 Subject: [PATCH] fix: Code editor throws dozen of errors (#28500) --- .../nodes/_base/components/editor/code-editor/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx b/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx index 2a69161bef..558dec7734 100644 --- a/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx +++ b/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx @@ -15,7 +15,8 @@ import { noop } from 'lodash-es' import { basePath } from '@/utils/var' // load file from local instead of cdn https://github.com/suren-atoyan/monaco-react/issues/482 -loader.config({ paths: { vs: `${basePath}/vs` } }) +if (typeof window !== 'undefined') + loader.config({ paths: { vs: `${window.location.origin}${basePath}/vs` } }) const CODE_EDITOR_LINE_HEIGHT = 18