diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts index ac582b4230..c636234dad 100644 --- a/editors/code/src/commands/on_enter.ts +++ b/editors/code/src/commands/on_enter.ts @@ -8,7 +8,7 @@ async function handleKeypress(ctx: Ctx) { const editor = ctx.activeRustEditor; const client = ctx.client; if (!editor) return false; - if (!client) return false; + if (!editor || !client) return false; const request: lc.TextDocumentPositionParams = { textDocument: { uri: editor.document.uri.toString() },