Skip to content

Commit 921613b

Browse files
committed
fix: params.selection can be undefined
1 parent ef3bf1a commit 921613b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/adapters/show-document-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function onShowDocument(params: ShowDocumentParams): Promise<ShowDo
4040
initialLine: params.selection?.start.line ?? 0,
4141
initialColumn: params.selection?.start.character ?? 0,
4242
})
43-
if (view instanceof TextEditor && params.selection != null) {
43+
if (view instanceof TextEditor && params.selection !== undefined) {
4444
view.selectToBufferPosition(Convert.positionToPoint(params.selection.end))
4545
}
4646
return { success: true }

0 commit comments

Comments
 (0)