From a482bbc14c7d99a02962ba5cd6ad3da762f54255 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Wed, 16 Oct 2024 18:19:52 +0800 Subject: [PATCH] Fix(CodeEditor): Fix incorrect highlight jump --- src/components/Playground/CodeEditor/Editor/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Playground/CodeEditor/Editor/index.tsx b/src/components/Playground/CodeEditor/Editor/index.tsx index d06954b..bb4b9db 100644 --- a/src/components/Playground/CodeEditor/Editor/index.tsx +++ b/src/components/Playground/CodeEditor/Editor/index.tsx @@ -84,7 +84,7 @@ const Editor = ({ input: { options: { selection: Selection }; resource: { path: string } } ) { const path = input.resource.path - if (!path.startsWith('/node_modules/')) { + if (!['/lib.dom.d.ts', '/node_modules/'].some((item) => path.startsWith(item))) { onJumpFile?.(path.replace('/', '')) doOpenEditor(editor, input) }