From 13e2cebe04ba7fead4dfcbe62c6c48bcadb0f9ad Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Sun, 27 Oct 2024 00:51:17 +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/renderer/src/components/Playground/CodeEditor/Editor/index.tsx b/src/renderer/src/components/Playground/CodeEditor/Editor/index.tsx index d06954b..bb4b9db 100644 --- a/src/renderer/src/components/Playground/CodeEditor/Editor/index.tsx +++ b/src/renderer/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) }