mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
refactor(vscode): simplify openFile null check with optional chaining
This commit is contained in:
@@ -213,8 +213,7 @@ export function handleDocumentOpen(
|
||||
const line = typeof detail.line === "number" ? detail.line : undefined
|
||||
const column = typeof detail.column === "number" ? detail.column : undefined
|
||||
if (!isMarkdownPath(file)) {
|
||||
if (!openFile) return
|
||||
if (!openFile(file, line, column, sessionId)) return
|
||||
if (!openFile?.(file, line, column, sessionId)) return
|
||||
event.preventDefault()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user